| 
						
						
							
								
							
						
						
					 | 
				
			
			 | 
			 | 
			
				@ -4807,6 +4807,7 @@ typedef enum : NSUInteger {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            TSOutgoingMessage *outgoingMessage = (TSOutgoingMessage *)viewItem.interaction;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            MessageReceiptStatus receiptStatus =
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                [MessageRecipientStatusUtils recipientStatusWithOutgoingMessage:outgoingMessage];
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            BOOL isDisappearingMessage = outgoingMessage.shouldStartExpireTimer;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            if (nextViewItem && nextViewItem.interaction.interactionType == interactionType) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                TSOutgoingMessage *nextOutgoingMessage = (TSOutgoingMessage *)nextViewItem.interaction;
 | 
			
		
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
			
			 | 
			 | 
			
				@ -4816,10 +4817,12 @@ typedef enum : NSUInteger {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                // We can skip the "outgoing message status" footer if the next message
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                // has the same footer and no "date break" separates us...
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                // ...but always show "failed to send" status.
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                shouldHideFooter = ([timestampText isEqualToString:nextTimestampText]
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    && receiptStatus == nextReceiptStatus
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    && outgoingMessage.messageState != TSOutgoingMessageStateFailed && !nextViewItem.shouldShowDate);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                // ...but always show "failed to send" status
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                // ...and always show the "disappearing messages" animation.
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                shouldHideFooter
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    = ([timestampText isEqualToString:nextTimestampText] && receiptStatus == nextReceiptStatus
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                        && outgoingMessage.messageState != TSOutgoingMessageStateFailed && !nextViewItem.shouldShowDate
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                        && !isDisappearingMessage);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            // clustering
 | 
			
		
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
			
			 | 
			 | 
			
				@ -4843,6 +4846,7 @@ typedef enum : NSUInteger {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            TSIncomingMessage *incomingMessage = (TSIncomingMessage *)viewItem.interaction;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            NSString *incomingSenderId = incomingMessage.authorId;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            OWSAssert(incomingSenderId.length > 0);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            BOOL isDisappearingMessage = incomingMessage.shouldStartExpireTimer;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            NSString *_Nullable nextIncomingSenderId = nil;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            if (nextViewItem && nextViewItem.interaction.interactionType == interactionType) {
 | 
			
		
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
			
			 | 
			 | 
			
				@ -4855,8 +4859,10 @@ typedef enum : NSUInteger {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                NSString *nextTimestampText = [DateUtil formatTimestampShort:nextViewItem.interaction.timestamp];
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                // We can skip the "incoming message status" footer in a cluster if the next message
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                // has the same footer and no "date break" separates us.
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                shouldHideFooter = [timestampText isEqualToString:nextTimestampText] && !nextViewItem.shouldShowDate &&
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    [NSObject isNullableObject:nextIncomingSenderId equalTo:incomingSenderId];
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                // ...but always show the "disappearing messages" animation.
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                shouldHideFooter = ([timestampText isEqualToString:nextTimestampText] && !nextViewItem.shouldShowDate &&
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    [NSObject isNullableObject:nextIncomingSenderId equalTo:incomingSenderId]
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    && !isDisappearingMessage);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            // clustering
 | 
			
		
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
			
			 | 
			 | 
			
				
 
 |