From f3102e2761421ce8ce8256274c67cf16d744bf64 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Mon, 16 Oct 2017 12:09:28 -0400 Subject: [PATCH] Fix presentation animation of new "attachment approval" state of input toolbar. // FREEBIE --- .../ConversationView/ConversationInputToolbar.m | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Signal/src/ViewControllers/ConversationView/ConversationInputToolbar.m b/Signal/src/ViewControllers/ConversationView/ConversationInputToolbar.m index 257286b03a..0edb477c7f 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationInputToolbar.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationInputToolbar.m @@ -211,14 +211,20 @@ static void *kConversationInputTextViewObservingContext = &kConversationInputTex if (self.attachmentToApprove) { self.contentView.hidden = YES; self.attachmentApprovalView.hidden = NO; - // Ensure the keyboard is dismissed. - [self.inputTextView resignFirstResponder]; self.contentContraints = @[ [self.attachmentApprovalView autoSetDimension:ALDimensionHeight toSize:300.f], ]; + [self setNeedsLayout]; [self layoutIfNeeded]; + + // Ensure the keyboard is dismissed. + // + // NOTE: We need to do this _last_ or the layout changes in the input toolbar + // will be inadvertently animated. + [self.inputTextView resignFirstResponder]; + return; }