Respond to CR.

// FREEBIE
This commit is contained in:
Matthew Chen 2017-05-19 18:28:40 -04:00
parent 14ebc58d52
commit ac0c6e21de
1 changed files with 2 additions and 0 deletions

View File

@ -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)