| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -2380,7 +2380,6 @@ typedef enum : NSUInteger {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        return;
 | 
					 | 
					 | 
					 | 
					        return;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    }
 | 
					 | 
					 | 
					 | 
					    }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    
 | 
					 | 
					 | 
					 | 
					    
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    __block BOOL scrollToBottom = NO;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    const CGFloat kIsAtBottomTolerancePts = 5;
 | 
					 | 
					 | 
					 | 
					    const CGFloat kIsAtBottomTolerancePts = 5;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    BOOL wasAtBottom = (self.collectionView.contentOffset.y +
 | 
					 | 
					 | 
					 | 
					    BOOL wasAtBottom = (self.collectionView.contentOffset.y +
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        self.collectionView.bounds.size.height +
 | 
					 | 
					 | 
					 | 
					                        self.collectionView.bounds.size.height +
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -2390,6 +2389,11 @@ typedef enum : NSUInteger {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    // update is a new outgoing message AND we're already scrolled to
 | 
					 | 
					 | 
					 | 
					    // update is a new outgoing message AND we're already scrolled to
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    // the bottom of the conversation, skip the scroll animation.
 | 
					 | 
					 | 
					 | 
					    // the bottom of the conversation, skip the scroll animation.
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    __block BOOL shouldAnimateScrollToBottom = !wasAtBottom;
 | 
					 | 
					 | 
					 | 
					    __block BOOL shouldAnimateScrollToBottom = !wasAtBottom;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    // We want to scroll to the bottom if the user:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    //
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    // a) already was at the bottom of the conversation.
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    // b) is inserting new interactions.
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    __block BOOL scrollToBottom = wasAtBottom;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    [self.collectionView performBatchUpdates:^{
 | 
					 | 
					 | 
					 | 
					    [self.collectionView performBatchUpdates:^{
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      for (YapDatabaseViewRowChange *rowChange in messageRowChanges) {
 | 
					 | 
					 | 
					 | 
					      for (YapDatabaseViewRowChange *rowChange in messageRowChanges) {
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
 
 |