Fix "missing ThreadAssociatedData", again.
This commit is contained in:
parent
86f8793b39
commit
ea7721fd65
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user