marinofaggiana 4 năm trước cách đây
mục cha
commit
181f8e0bf5

+ 2 - 6
iOSClient/Main/NCMainNavigationController.swift

@@ -32,12 +32,8 @@ class NCMainNavigationController: UINavigationController {
         
         NotificationCenter.default.addObserver(self, selector: #selector(changeTheming), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterChangeTheming), object: nil)
         
-        if #available(iOS 13.0, *) {
-            if traitCollection.userInterfaceStyle == .dark {
-                appDelegate.darkMode = true
-            } else {
-                appDelegate.darkMode = false
-            }
+        if traitCollection.userInterfaceStyle == .dark {
+            appDelegate.darkMode = true
         } else {
             appDelegate.darkMode = false
         }

+ 2 - 6
iOSClient/Main/NCMainTabBar.swift

@@ -42,12 +42,8 @@ class NCMainTabBar: UITabBar {
         NotificationCenter.default.addObserver(self, selector: #selector(changeTheming), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterChangeTheming), object: nil)
         NotificationCenter.default.addObserver(self, selector: #selector(updateBadgeNumber), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterUpdateBadgeNumber), object: nil)
 
-        if #available(iOS 13.0, *) {
-            if traitCollection.userInterfaceStyle == .dark {
-                appDelegate.darkMode = true
-            } else {
-                appDelegate.darkMode = false
-            }
+        if traitCollection.userInterfaceStyle == .dark {
+            appDelegate.darkMode = true
         } else {
             appDelegate.darkMode = false
         }