|  |  | @ -329,8 +329,11 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             [self setNavigationTitle]; |  |  |  |             [self setNavigationTitle]; | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         // Reload all cells. |  |  |  |         if (self.isGroupConversation) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         [self resetContentAndLayout]; |  |  |  |             // Reload all cells if this is a group conversation, | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             // since we may need to update the sender names on the messages. | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             [self resetContentAndLayout]; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  | } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -633,10 +636,8 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) { | 
			
		
	
		
		
			
				
					
					|  |  |  | - (void)resetContentAndLayout |  |  |  | - (void)resetContentAndLayout | 
			
		
	
		
		
			
				
					
					|  |  |  | { |  |  |  | { | 
			
		
	
		
		
			
				
					
					|  |  |  |     // Avoid layout corrupt issues and out-of-date message subtitles. |  |  |  |     // Avoid layout corrupt issues and out-of-date message subtitles. | 
			
		
	
		
		
			
				
					
					|  |  |  |     [self.collectionView.collectionViewLayout |  |  |  |     [self.collectionView.collectionViewLayout invalidateLayout]; | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         invalidateLayoutWithContext:[JSQMessagesCollectionViewFlowLayoutInvalidationContext context]]; |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     [self.collectionView reloadData]; |  |  |  |     [self.collectionView reloadData]; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     // TODO: Should we evacuate cached cell sizes here? |  |  |  |     // TODO: Should we evacuate cached cell sizes here? | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  | } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -1369,7 +1370,6 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | #pragma mark - Dynamic Text |  |  |  | #pragma mark - Dynamic Text | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | // TODO: Fix this. |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | /** |  |  |  | /** | 
			
		
	
		
		
			
				
					
					|  |  |  |  Called whenever the user manually changes the dynamic type options inside Settings. |  |  |  |  Called whenever the user manually changes the dynamic type options inside Settings. | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -1377,9 +1377,14 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  */ |  |  |  |  */ | 
			
		
	
		
		
			
				
					
					|  |  |  | - (void)didChangePreferredContentSize:(NSNotification *)notification |  |  |  | - (void)didChangePreferredContentSize:(NSNotification *)notification | 
			
		
	
		
		
			
				
					
					|  |  |  | { |  |  |  | { | 
			
		
	
		
		
			
				
					
					|  |  |  |     //    [self.collectionView.collectionViewLayout setMessageBubbleFont:[UIFont ows_dynamicTypeBodyFont]]; |  |  |  |     DDLogInfo(@"%@ didChangePreferredContentSize", self.tag); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     // Evacuate cached cell sizes. | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     for (ConversationViewItem *viewItem in self.viewItems) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         [viewItem clearCachedLayoutState]; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |     [self resetContentAndLayout]; |  |  |  |     [self resetContentAndLayout]; | 
			
		
	
		
		
			
				
					
					|  |  |  |     //    [self reloadInputToolbarSizeIfNeeded]; |  |  |  |     [self.inputToolbar updateFontSizes]; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  | } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | #pragma mark - Actions |  |  |  | #pragma mark - Actions | 
			
		
	
	
		
		
			
				
					|  |  | @ -2792,6 +2797,11 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) { | 
			
		
	
		
		
			
				
					
					|  |  |  |         // may need to extend the mapping's contents to reflect the current |  |  |  |         // may need to extend the mapping's contents to reflect the current | 
			
		
	
		
		
			
				
					
					|  |  |  |         // range. |  |  |  |         // range. | 
			
		
	
		
		
			
				
					
					|  |  |  |         [self updateMessageMappingRangeOptions:MessagesRangeSizeMode_Normal]; |  |  |  |         [self updateMessageMappingRangeOptions:MessagesRangeSizeMode_Normal]; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         // Calling resetContentAndLayout is a bit expensive. | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         // Since by definition this won't affect any cells in the previous | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         // range, it should be sufficient to call invalidateLayout. | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         // | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         // TODO: Investigate whether we can just call invalidateLayout. | 
			
		
	
		
		
			
				
					
					|  |  |  |         [self resetContentAndLayout]; |  |  |  |         [self resetContentAndLayout]; | 
			
		
	
		
		
			
				
					
					|  |  |  |         return; |  |  |  |         return; | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
	
		
		
			
				
					|  |  | @ -3579,7 +3589,6 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) { | 
			
		
	
		
		
			
				
					
					|  |  |  |     [groupMemberIds addObject:[TSAccountManager localNumber]]; |  |  |  |     [groupMemberIds addObject:[TSAccountManager localNumber]]; | 
			
		
	
		
		
			
				
					
					|  |  |  |     groupModel.groupMemberIds = [NSMutableArray arrayWithArray:[groupMemberIds allObjects]]; |  |  |  |     groupModel.groupMemberIds = [NSMutableArray arrayWithArray:[groupMemberIds allObjects]]; | 
			
		
	
		
		
			
				
					
					|  |  |  |     [self updateGroupModelTo:groupModel successCompletion:nil]; |  |  |  |     [self updateGroupModelTo:groupModel successCompletion:nil]; | 
			
		
	
		
		
			
				
					
					|  |  |  |     [self resetContentAndLayout]; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  | } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | - (void)popAllConversationSettingsViews |  |  |  | - (void)popAllConversationSettingsViews | 
			
		
	
	
		
		
			
				
					|  |  | @ -3668,20 +3677,12 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) { | 
			
		
	
		
		
			
				
					
					|  |  |  |         [self toggleDefaultKeyboard]; |  |  |  |         [self toggleDefaultKeyboard]; | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |     [self clearDraft]; |  |  |  |     [self clearDraft]; | 
			
		
	
		
		
			
				
					
					|  |  |  |     [self finishSendingMessage]; |  |  |  |     [self.inputToolbar clearTextMessage]; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     if (didAddToProfileWhitelist) { |  |  |  |     if (didAddToProfileWhitelist) { | 
			
		
	
		
		
			
				
					
					|  |  |  |         [self ensureDynamicInteractions]; |  |  |  |         [self ensureDynamicInteractions]; | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  | } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | - (void)finishSendingMessage |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     [self.inputToolbar clearTextMessage]; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     [self.collectionView.collectionViewLayout |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         invalidateLayoutWithContext:[JSQMessagesCollectionViewFlowLayoutInvalidationContext context]]; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     [self.collectionView reloadData]; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | - (void)voiceMemoGestureDidStart |  |  |  | - (void)voiceMemoGestureDidStart | 
			
		
	
		
		
			
				
					
					|  |  |  | { |  |  |  | { | 
			
		
	
		
		
			
				
					
					|  |  |  |     OWSAssert([NSThread isMainThread]); |  |  |  |     OWSAssert([NSThread isMainThread]); | 
			
		
	
	
		
		
			
				
					|  |  | 
 |