Merge branch 'charlesmchen/stickyStickerKeyboard'

This commit is contained in:
Matthew Chen 2019-05-03 10:22:45 -04:00
commit ee7d7e0ca5
2 changed files with 4 additions and 19 deletions

View File

@ -389,7 +389,9 @@ const CGFloat kMaxTextViewHeight = 98;
[self ensureTextViewHeight];
[self updateInputLinkPreview];
[self clearStickerKeyboard];
if (value.length > 0) {
[self clearStickerKeyboard];
}
[self ensureButtonVisibilityWithIsAnimated:isAnimated doLayout:YES];
}
@ -401,7 +403,6 @@ const CGFloat kMaxTextViewHeight = 98;
- (void)clearTextMessageAnimated:(BOOL)isAnimated
{
[self clearStickerKeyboard];
[self setMessageText:nil animated:isAnimated];
[self.inputTextView.undoManager removeAllActions];
self.wasLinkPreviewCancelled = NO;
@ -680,8 +681,6 @@ const CGFloat kMaxTextViewHeight = 98;
{
OWSAssertIsOnMainThread();
[self clearStickerKeyboard];
self.voiceMemoStartTime = [NSDate date];
[self.voiceMemoUI removeFromSuperview];
@ -984,8 +983,6 @@ const CGFloat kMaxTextViewHeight = 98;
{
OWSAssertDebug(self.inputToolbarDelegate);
[self clearStickerKeyboard];
[self.inputToolbarDelegate cameraButtonPressed];
}
@ -993,8 +990,6 @@ const CGFloat kMaxTextViewHeight = 98;
{
OWSAssertDebug(self.inputToolbarDelegate);
[self clearStickerKeyboard];
[self.inputToolbarDelegate attachmentButtonPressed];
}
@ -1037,8 +1032,6 @@ const CGFloat kMaxTextViewHeight = 98;
OWSAssertIsOnMainThread();
self.isStickerKeyboardActive = NO;
// TODO: We may want to endEditingMessage, once we've reworked
// our usage of clearStickerKeyboard.
}
- (UIResponder *)desiredFirstResponder

View File

@ -1318,6 +1318,7 @@ typedef enum : NSUInteger {
[self markVisibleMessagesAsRead];
[self cancelVoiceMemo];
[self.cellMediaCache removeAllObjects];
[self.inputToolbar clearStickerKeyboard];
self.isUserScrolling = NO;
}
@ -1730,8 +1731,6 @@ typedef enum : NSUInteger {
- (void)showConversationSettingsAndShowVerification:(BOOL)showVerification
{
[self.inputToolbar clearStickerKeyboard];
OWSConversationSettingsViewController *settingsVC = [OWSConversationSettingsViewController new];
settingsVC.conversationSettingsViewDelegate = self;
[settingsVC configureWithThread:self.thread uiDatabaseConnection:self.uiDatabaseConnection];
@ -2423,8 +2422,6 @@ typedef enum : NSUInteger {
OWSAssertDebug(conversationItem);
OWSAssertDebug([conversationItem.interaction isKindOfClass:[TSMessage class]]);
[self.inputToolbar clearStickerKeyboard];
LongTextViewController *viewController = [[LongTextViewController alloc] initWithViewItem:conversationItem];
viewController.delegate = self;
[self.navigationController pushViewController:viewController animated:YES];
@ -2437,8 +2434,6 @@ typedef enum : NSUInteger {
OWSAssertDebug(conversationItem.contactShare);
OWSAssertDebug([conversationItem.interaction isKindOfClass:[TSMessage class]]);
[self.inputToolbar clearStickerKeyboard];
ContactViewController *view = [[ContactViewController alloc] initWithContactShare:conversationItem.contactShare];
[self.navigationController pushViewController:view animated:YES];
}
@ -2565,8 +2560,6 @@ typedef enum : NSUInteger {
OWSAssertDebug(conversationItem);
OWSAssertDebug([conversationItem.interaction isKindOfClass:[TSMessage class]]);
[self.inputToolbar clearStickerKeyboard];
TSMessage *message = (TSMessage *)conversationItem.interaction;
MessageDetailViewController *detailVC =
[[MessageDetailViewController alloc] initWithViewItem:conversationItem
@ -2813,7 +2806,6 @@ typedef enum : NSUInteger {
self.lastMessageSentDate = [NSDate new];
[self.conversationViewModel clearUnreadMessagesIndicator];
self.inputToolbar.quotedReply = nil;
[self.inputToolbar clearStickerKeyboard];
if (!Environment.shared.preferences.hasSentAMessage) {
[Environment.shared.preferences setHasSentAMessage:YES];