reload cell after removing unread indicator

// FREEBIE
This commit is contained in:
Michael Kirk 2018-07-16 15:07:25 -06:00
parent 51d753c131
commit f2f3b9eaed
1 changed files with 10 additions and 0 deletions

View File

@ -2605,6 +2605,16 @@ typedef enum : NSUInteger {
{
OWSAssertIsOnMainThread();
NSIndexPath *_Nullable indexPathOfUnreadIndicator = [self indexPathOfUnreadMessagesIndicator];
if (indexPathOfUnreadIndicator) {
ConversationViewItem *oldIndicatorItem = [self viewItemForIndex:indexPathOfUnreadIndicator.row];
OWSAssert(oldIndicatorItem);
oldIndicatorItem.unreadIndicator = nil;
[self.collectionView reloadItemsAtIndexPaths:@[ indexPathOfUnreadIndicator ]];
}
if (self.hasClearedUnreadMessagesIndicator) {
// ensureDynamicInteractionsForThread is somewhat expensive
// so we don't want to call it unnecessarily.