Don't block on intent donation.
This commit is contained in:
parent
c2a71d62f1
commit
c9cedeb8d6
@ -243,23 +243,15 @@ class UserNotificationPresenterAdaptee: NSObject, NotificationPresenterAdaptee {
|
||||
Logger.info("Will donate interaction")
|
||||
}
|
||||
|
||||
let group = DispatchGroup()
|
||||
group.enter()
|
||||
interaction.donate(completion: { error in
|
||||
if DebugFlags.internalLogging { Logger.info("Did donate interaction") }
|
||||
|
||||
group.leave()
|
||||
|
||||
if let error = error {
|
||||
owsFailDebug("Failed to donate incoming message intent \(error)")
|
||||
return
|
||||
}
|
||||
})
|
||||
|
||||
if case .timedOut = group.wait(timeout: .now() + 1.0) {
|
||||
Logger.warn("Timed out donating intent")
|
||||
}
|
||||
|
||||
if DebugFlags.internalLogging {
|
||||
Logger.info("Will update notification content with intent")
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user