marinofaggiana 4 years ago
parent
commit
7d12bad3d9
1 changed files with 6 additions and 7 deletions
  1. 6 7
      iOSClient/AppDelegate.swift

+ 6 - 7
iOSClient/AppDelegate.swift

@@ -75,6 +75,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
             FirebaseApp.configure()
         }
         
+        if #available(iOS 13.0, *) {
+            setDarkMode(style: UITraitCollection.current.userInterfaceStyle)
+        } else {
+            darkMode = false
+        }
+        
         CCUtility.createDirectoryStandard()
         CCUtility.emptyTemporaryDirectory()
         
@@ -145,13 +151,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
             review.showStoreReview()
         }
         
-        // Detect Dark mode
-        if #available(iOS 13.0, *) {
-            setDarkMode(style: UITraitCollection.current.userInterfaceStyle)
-        } else {
-            darkMode = false
-        }
-        
         // Background task: register
         if #available(iOS 13.0, *) {
             BGTaskScheduler.shared.register(forTaskWithIdentifier: NCGlobal.shared.refreshTask, using: nil) { task in