From ac0c6e21de52ca2879fac61d0f10b2b95d6747de Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Fri, 19 May 2017 18:28:40 -0400 Subject: [PATCH] Respond to CR. // FREEBIE --- Signal/src/ViewControllers/MessagesViewController.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Signal/src/ViewControllers/MessagesViewController.m b/Signal/src/ViewControllers/MessagesViewController.m index f18e18167..f3a310477 100644 --- a/Signal/src/ViewControllers/MessagesViewController.m +++ b/Signal/src/ViewControllers/MessagesViewController.m @@ -987,6 +987,7 @@ typedef enum : NSUInteger { invalidateLayoutWithContext:[JSQMessagesCollectionViewFlowLayoutInvalidationContext context]]; [self.scrollLaterTimer invalidate]; + // We want to scroll to the bottom _after_ the layout has been updated. self.scrollLaterTimer = [NSTimer weakScheduledTimerWithTimeInterval:0.001f target:self selector:@selector(scrollToDefaultPosition) @@ -3691,6 +3692,7 @@ typedef enum : NSUInteger { BOOL wasAtBottom = [self isScrolledToBottom]; if (wasAtBottom) { [self.scrollLaterTimer invalidate]; + // We want to scroll to the bottom _after_ the layout has been updated. self.scrollLaterTimer = [NSTimer weakScheduledTimerWithTimeInterval:0.001f target:self selector:@selector(scrollToBottomImmediately)