Fix threading bug
This commit is contained in:
parent
9b525f77b6
commit
e8d8377a04
|
@ -288,7 +288,11 @@ extension MessageReceiver {
|
|||
// Notify the user if needed
|
||||
guard (isMainAppAndActive || isBackgroundPoll), let tsIncomingMessage = TSMessage.fetch(uniqueId: tsMessageID, transaction: transaction) as? TSIncomingMessage,
|
||||
let thread = TSThread.fetch(uniqueId: threadID, transaction: transaction) else { return tsMessageID }
|
||||
SSKEnvironment.shared.notificationsManager!.notifyUser(for: tsIncomingMessage, in: thread, transaction: transaction)
|
||||
DispatchQueue.main.async {
|
||||
Storage.read { transaction in
|
||||
SSKEnvironment.shared.notificationsManager!.notifyUser(for: tsIncomingMessage, in: thread, transaction: transaction)
|
||||
}
|
||||
}
|
||||
return tsMessageID
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue