From bb266d03e4fbf09c793706b192a0ab3d10c817e7 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Mon, 11 Jun 2018 15:09:05 -0400 Subject: [PATCH] Preserve default scroll state until conversation view is presented. --- .../ConversationView/ConversationViewController.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m index ac1b53cc4..861314ec2 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m @@ -4115,7 +4115,9 @@ typedef enum : NSUInteger { self.scrollDownButton.frame = newButtonFrame; // Adjust content offset to prevent the presented keyboard from obscuring content. - if (wasScrolledToBottom) { + if (!self.viewHasEverAppeared) { + [self scrollToDefaultPosition]; + } else if (wasScrolledToBottom) { // If we were scrolled to the bottom, don't do any fancy math. Just stay at the bottom. [self scrollToBottomAnimated:NO]; } else {