Always clear message drafts after sending a text message.

// FREEBIE
This commit is contained in:
Matthew Chen 2017-05-09 10:33:35 -04:00
parent 50b1f420b5
commit 29dd62a19a
1 changed files with 10 additions and 1 deletions

View File

@ -1509,6 +1509,7 @@ typedef enum : NSUInteger {
{
[self toggleDefaultKeyboard];
}
[self clearDraft];
[self finishSendingMessage];
}
}
@ -3349,11 +3350,19 @@ typedef enum : NSUInteger {
__block NSString *currentDraft = self.inputToolbar.contentView.textView.text;
[self.editingDatabaseConnection asyncReadWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
[thread setDraft:currentDraft transaction:transaction];
[thread setDraft:currentDraft transaction:transaction];
}];
}
}
- (void)clearDraft
{
__block TSThread *thread = _thread;
[self.editingDatabaseConnection asyncReadWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
[thread setDraft:@"" transaction:transaction];
}];
}
#pragma mark Unread Badge
- (void)updateBackButtonUnreadCount