From 4cfdb2eefbeaddeb227dedf73c9deab44ed791d1 Mon Sep 17 00:00:00 2001 From: Nora Trapp Date: Wed, 6 Nov 2019 11:05:39 -0800 Subject: [PATCH] Increase the maximum text input size for iPad --- .../ConversationView/ConversationInputToolbar.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Signal/src/ViewControllers/ConversationView/ConversationInputToolbar.m b/Signal/src/ViewControllers/ConversationView/ConversationInputToolbar.m index d9b32b182e..08ed73c746 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationInputToolbar.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationInputToolbar.m @@ -33,6 +33,7 @@ static void *kConversationInputTextViewObservingContext = &kConversationInputTex const CGFloat kMinTextViewHeight = 38; const CGFloat kMinToolbarItemHeight = 44; const CGFloat kMaxTextViewHeight = 98; +const CGFloat kMaxIPadTextViewHeight = 142; #pragma mark - @@ -1267,7 +1268,9 @@ const CGFloat kMaxTextViewHeight = 98; // `textView.contentSize` isn't accurate when restoring a multiline draft, so we compute it here. textView.contentSize = contentSize; - CGFloat newHeight = CGFloatClamp(contentSize.height, kMinTextViewHeight, kMaxTextViewHeight); + CGFloat newHeight = CGFloatClamp(contentSize.height, + kMinTextViewHeight, + UIDevice.currentDevice.isIPad ? kMaxIPadTextViewHeight : kMaxTextViewHeight); if (newHeight != self.textViewHeight) { self.textViewHeight = newHeight;