Remove most uses of AppDelegate.appDelegate on iOS.

This commit is contained in:
Brent Simmons
2025-02-01 13:28:49 -08:00
parent 2fed6d3cb3
commit 900cbabe71
10 changed files with 65 additions and 24 deletions

View File

@@ -65,13 +65,13 @@ final class SceneDelegate: UIResponder, UIWindowSceneDelegate {
}
func windowScene(_ windowScene: UIWindowScene, performActionFor shortcutItem: UIApplicationShortcutItem, completionHandler: @escaping (Bool) -> Void) {
appDelegate.resumeDatabaseProcessingIfNecessary()
AccountManager.shared.resumeAllIfSuspended()
handleShortcutItem(shortcutItem)
completionHandler(true)
}
func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {
appDelegate.resumeDatabaseProcessingIfNecessary()
AccountManager.shared.resumeAllIfSuspended()
coordinator.handle(userActivity)
}
@@ -81,7 +81,7 @@ final class SceneDelegate: UIResponder, UIWindowSceneDelegate {
}
func sceneWillEnterForeground(_ scene: UIScene) {
appDelegate.resumeDatabaseProcessingIfNecessary()
AccountManager.shared.resumeAllIfSuspended()
appDelegate.prepareAccountsForForeground()
coordinator.resetFocus()
}
@@ -93,7 +93,7 @@ final class SceneDelegate: UIResponder, UIWindowSceneDelegate {
// API
func handle(_ response: UNNotificationResponse) {
appDelegate.resumeDatabaseProcessingIfNecessary()
AccountManager.shared.resumeAllIfSuspended()
coordinator.handle(response)
}