resize bar after send
This commit is contained in:
parent
1d0a25dba9
commit
94a23e63b6
|
@ -47,8 +47,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
- (void)setInputTextViewDelegate:(id<ConversationInputTextViewDelegate>)value;
|
||||
|
||||
- (NSString *)messageText;
|
||||
- (void)setMessageText:(NSString *_Nullable)value;
|
||||
- (void)clearTextMessage;
|
||||
- (void)setMessageText:(NSString *_Nullable)value animated:(BOOL)isAnimated;
|
||||
- (void)clearTextMessageAnimated:(BOOL)isAnimated;
|
||||
- (void)toggleDefaultKeyboard;
|
||||
|
||||
- (void)updateFontSizes;
|
||||
|
|
|
@ -192,18 +192,19 @@ const CGFloat kMaxTextViewHeight = 98;
|
|||
return self.inputTextView.trimmedText;
|
||||
}
|
||||
|
||||
- (void)setMessageText:(NSString *_Nullable)value
|
||||
- (void)setMessageText:(NSString *_Nullable)value animated:(BOOL)isAnimated
|
||||
{
|
||||
OWSAssert(self.inputTextView);
|
||||
|
||||
self.inputTextView.text = value;
|
||||
|
||||
[self ensureShouldShowVoiceMemoButtonAnimated:NO];
|
||||
[self ensureShouldShowVoiceMemoButtonAnimated:isAnimated];
|
||||
[self updateHeightWithTextView:self.inputTextView];
|
||||
}
|
||||
|
||||
- (void)clearTextMessage
|
||||
- (void)clearTextMessageAnimated:(BOOL)isAnimated
|
||||
{
|
||||
[self setMessageText:nil];
|
||||
[self setMessageText:nil animated:isAnimated];
|
||||
[self.inputTextView.undoManager removeAllActions];
|
||||
}
|
||||
|
||||
|
@ -578,22 +579,6 @@ const CGFloat kMaxTextViewHeight = 98;
|
|||
|
||||
#pragma mark - Event Handlers
|
||||
|
||||
//- (void)leftButtonTapped:(UIGestureRecognizer *)sender
|
||||
//{
|
||||
// if (sender.state == UIGestureRecognizerStateRecognized) {
|
||||
// [self attachmentButtonPressed];
|
||||
// }
|
||||
//}
|
||||
|
||||
//- (void)rightButtonTapped:(UIGestureRecognizer *)sender
|
||||
//{
|
||||
// if (sender.state == UIGestureRecognizerStateRecognized) {
|
||||
// if (!self.shouldShowVoiceMemoButton) {
|
||||
// [self sendButtonPressed];
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
- (void)sendButtonPressed
|
||||
{
|
||||
OWSAssert(self.inputToolbarDelegate);
|
||||
|
|
|
@ -3980,7 +3980,7 @@ typedef enum : NSUInteger {
|
|||
[self.uiDatabaseConnection readWithBlock:^(YapDatabaseReadTransaction *transaction) {
|
||||
draft = [_thread currentDraftWithTransaction:transaction];
|
||||
}];
|
||||
[self.inputToolbar setMessageText:draft];
|
||||
[self.inputToolbar setMessageText:draft animated:NO];
|
||||
}
|
||||
|
||||
- (void)saveDraft
|
||||
|
@ -4417,7 +4417,7 @@ typedef enum : NSUInteger {
|
|||
if (updateKeyboardState) {
|
||||
[self.inputToolbar toggleDefaultKeyboard];
|
||||
}
|
||||
[self.inputToolbar clearTextMessage];
|
||||
[self.inputToolbar clearTextMessageAnimated:YES];
|
||||
[self clearDraft];
|
||||
if (didAddToProfileWhitelist) {
|
||||
[self ensureDynamicInteractions];
|
||||
|
|
Loading…
Reference in New Issue