From 0493e868115bf018ad82df8b5a185446be8d9e45 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sat, 26 Apr 2025 15:11:14 -0700 Subject: [PATCH] Fix crash (hopefully) by moving call that was triggering a code path that crashed. --- iOS/SceneDelegate.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/iOS/SceneDelegate.swift b/iOS/SceneDelegate.swift index 758f21071..85e6d1e8c 100644 --- a/iOS/SceneDelegate.swift +++ b/iOS/SceneDelegate.swift @@ -20,7 +20,6 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { window!.tintColor = AppAssets.primaryAccentColor - updateUserInterfaceStyle() UINavigationBar.appearance().scrollEdgeAppearance = UINavigationBarAppearance() let rootViewController = window!.rootViewController as! RootSplitViewController @@ -40,7 +39,9 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { rootViewController.delegate = coordinator coordinator.restoreWindowState(session.stateRestorationActivity) - + + updateUserInterfaceStyle() + NotificationCenter.default.addObserver(self, selector: #selector(userDefaultsDidChange), name: UserDefaults.didChangeNotification, object: nil) if let _ = connectionOptions.urlContexts.first?.url {