Normalize conversation presentation logic.

// FREEBIE
pull/1/head
Matthew Chen 8 years ago
parent b6d782046a
commit 04d452b074

@ -200,15 +200,16 @@ static Environment *environment = nil;
keyboardOnViewAppearing:(BOOL)keyboardOnViewAppearing keyboardOnViewAppearing:(BOOL)keyboardOnViewAppearing
callOnViewAppearing:(BOOL)callOnViewAppearing callOnViewAppearing:(BOOL)callOnViewAppearing
{ {
DispatchMainThreadSafe(^{
__block TSThread *thread = nil;
[[TSStorageManager sharedManager].dbReadWriteConnection [[TSStorageManager sharedManager].dbReadWriteConnection
asyncReadWriteWithBlock:^(YapDatabaseReadWriteTransaction *_Nonnull transaction) { readWriteWithBlock:^(YapDatabaseReadWriteTransaction *_Nonnull transaction) {
TSThread *thread = [TSContactThread getOrCreateThreadWithContactId:recipientId transaction:transaction]; thread = [TSContactThread getOrCreateThreadWithContactId:recipientId transaction:transaction];
dispatch_async(dispatch_get_main_queue(), ^{ }];
[self presentConversationForThread:thread [self presentConversationForThread:thread
keyboardOnViewAppearing:keyboardOnViewAppearing keyboardOnViewAppearing:keyboardOnViewAppearing
callOnViewAppearing:callOnViewAppearing]; callOnViewAppearing:callOnViewAppearing];
}); });
}];
} }
+ (void)presentConversationForThread:(TSThread *)thread + (void)presentConversationForThread:(TSThread *)thread

Loading…
Cancel
Save