From 4fe2a3134fb8ebc04a6fe3fb6e96ea27f8bd36ac Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sun, 2 Feb 2020 12:11:39 -0800 Subject: [PATCH] Suspend the databases sooner when suspending the application. --- iOS/AppDelegate.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iOS/AppDelegate.swift b/iOS/AppDelegate.swift index a4784955b..50778cb92 100644 --- a/iOS/AppDelegate.swift +++ b/iOS/AppDelegate.swift @@ -295,7 +295,8 @@ private extension AppDelegate { guard UIApplication.shared.applicationState == .background else { return } AccountManager.shared.suspendNetworkAll() - + AccountManager.shared.suspendDatabaseAll() + CoalescingQueue.standard.performCallsImmediately() for scene in UIApplication.shared.connectedScenes { if let sceneDelegate = scene.delegate as? SceneDelegate { @@ -303,7 +304,6 @@ private extension AppDelegate { } } - AccountManager.shared.suspendDatabaseAll() os_log("Application processing suspended.", log: self.log, type: .info) }