Suspend the databases sooner when suspending the application.
This commit is contained in:
parent
206da20387
commit
4fe2a3134f
|
@ -295,6 +295,7 @@ private extension AppDelegate {
|
||||||
guard UIApplication.shared.applicationState == .background else { return }
|
guard UIApplication.shared.applicationState == .background else { return }
|
||||||
|
|
||||||
AccountManager.shared.suspendNetworkAll()
|
AccountManager.shared.suspendNetworkAll()
|
||||||
|
AccountManager.shared.suspendDatabaseAll()
|
||||||
|
|
||||||
CoalescingQueue.standard.performCallsImmediately()
|
CoalescingQueue.standard.performCallsImmediately()
|
||||||
for scene in UIApplication.shared.connectedScenes {
|
for scene in UIApplication.shared.connectedScenes {
|
||||||
|
@ -303,7 +304,6 @@ private extension AppDelegate {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AccountManager.shared.suspendDatabaseAll()
|
|
||||||
os_log("Application processing suspended.", log: self.log, type: .info)
|
os_log("Application processing suspended.", log: self.log, type: .info)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue