diff --git a/Signal/src/ViewControllers/RecipientPicker/ComposeViewController.swift b/Signal/src/ViewControllers/RecipientPicker/ComposeViewController.swift index 37d4176397..36c7eba722 100644 --- a/Signal/src/ViewControllers/RecipientPicker/ComposeViewController.swift +++ b/Signal/src/ViewControllers/RecipientPicker/ComposeViewController.swift @@ -51,8 +51,19 @@ class ComposeViewController: OWSViewController { func newConversation(address: SignalServiceAddress) { assert(address.isValid) - let thread = TSContactThread.getOrCreateThread(contactAddress: address) - newConversation(thread: thread) + + Self.databaseStorage.write { [weak self] transaction in + let thread = TSContactThread.getOrCreateThread(withContactAddress: address, + transaction: transaction) + Self.databaseStorage.touch(thread: thread, + shouldReindex: false, + transaction: transaction) + Self.databaseStorage.add(uiDatabaseSnapshotFlushBlock: { + DispatchQueue.main.async { + self?.newConversation(thread: thread) + } + }) + } } func newConversation(thread: TSThread) {