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