From 567f625902a9163c213911a476685de18e837486 Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Mon, 16 Jul 2018 15:47:00 -0600 Subject: [PATCH] touch instead of reload to make sure any adjacent bubbles are updated appropriately. --- .../ConversationView/ConversationViewController.m | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m index 6f70d7cdb..e8f04599d 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m @@ -2610,9 +2610,12 @@ typedef enum : NSUInteger { ConversationViewItem *oldIndicatorItem = [self viewItemForIndex:indexPathOfUnreadIndicator.row]; OWSAssert(oldIndicatorItem); - oldIndicatorItem.unreadIndicator = nil; - - [self.collectionView reloadItemsAtIndexPaths:@[ indexPathOfUnreadIndicator ]]; + // TODO ideally this would be happening within the *same* transaction that caused the unreadMessageIndicator + // to be cleared. + [self.editingDatabaseConnection + asyncReadWriteWithBlock:^(YapDatabaseReadWriteTransaction *_Nonnull transaction) { + [oldIndicatorItem.interaction touchWithTransaction:transaction]; + }]; } if (self.hasClearedUnreadMessagesIndicator) {