From 0b64ecf675fda0441df5cdfe0a9bcbe9b2934bbf Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Wed, 20 Jun 2018 14:46:24 -0400 Subject: [PATCH] Respond to CR. --- .../ConversationView/ConversationViewController.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m index 8110a2bae..bab602eb6 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m @@ -1598,6 +1598,10 @@ typedef enum : NSUInteger { if (hasEarlierUnseenMessages && !self.focusMessageIdOnOpen) { // Ensure view items are updated before trying to scroll to the // unread indicator. + // + // loadNMoreMessages calls resetMappings which calls ensureDynamicInteractions, + // which may move the unread indicator, and for scrollToUnreadIndicatorAnimated + // to work properly, the view items need to be updated to reflect that change. [[OWSPrimaryStorage sharedManager] updateUIDatabaseConnectionToLatest]; [self scrollToUnreadIndicatorAnimated];