From ceaf02844596121b2b3b7fd050d397aa28e38d83 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Fri, 16 Feb 2018 14:06:46 -0500 Subject: [PATCH] Always scroll to bottom after sending attachments. --- .../ConversationView/ConversationViewController.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m index 3eac90b3b..2bf639e2e 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m @@ -3787,6 +3787,11 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) { { [self sendMessageAttachment:attachment]; [self dismissViewControllerAnimated:YES completion:nil]; + // We always want to scroll to the bottom of the conversation after the local user + // sends a message. Normally, this is taken care of in yapDatabaseModified:, but + // we don't listen to db modifications when this view isn't visible, i.e. when the + // attachment approval view is presented. + [self scrollToBottomAnimated:YES]; } - (void)attachmentApproval:(AttachmentApprovalViewController *)attachmentApproval didCancelAttachment:(SignalAttachment * _Nonnull)attachment