|
@@ -42,6 +42,17 @@ 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(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)
|
|
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
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ appDelegate.darkMode = false
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ NCBrandColor.shared.setDarkMode(appDelegate.darkMode)
|
|
changeTheming()
|
|
changeTheming()
|
|
}
|
|
}
|
|
|
|
|