marinofaggiana преди 3 години
родител
ревизия
9179ba793e

+ 3 - 9
iOSClient/Account Request/NCAccountRequest.swift

@@ -77,7 +77,7 @@ class NCAccountRequest: UIViewController {
         NotificationCenter.default.addObserver(self, selector: #selector(startTimer), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterApplicationDidBecomeActive), object: nil)
         NotificationCenter.default.addObserver(self, selector: #selector(applicationDidEnterBackground), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterApplicationDidEnterBackground), object: nil)
         
-        setColors(userInterfaceStyle: nil)
+        changeTheming()
     }
     
     override func viewWillAppear(_ animated: Bool) {
@@ -105,18 +105,12 @@ class NCAccountRequest: UIViewController {
     override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
         super.traitCollectionDidChange(previousTraitCollection)
         
-        setColors(userInterfaceStyle: traitCollection.userInterfaceStyle)
+        changeTheming()
     }
     
     // MARK: - Colors
     
-    func setColors(userInterfaceStyle: UIUserInterfaceStyle?) {
-        
-        if userInterfaceStyle == .dark {
-            // personalized
-        } else {
-            // personalized
-        }
+    func changeTheming() {
         
         view.backgroundColor = NCBrandColor.shared.secondarySystemBackground
         tableView.backgroundColor = NCBrandColor.shared.secondarySystemBackground

+ 3 - 9
iOSClient/Main/AudioRecorder/NCAudioRecorderViewController.swift

@@ -54,7 +54,7 @@ class NCAudioRecorderViewController: UIViewController , NCAudioRecorderDelegate
         durationLabel.text = ""
         startStopLabel.text = NSLocalizedString("_voice_memo_start_", comment: "")
         
-        setColors(userInterfaceStyle: nil)
+        changeTheming()
     }
     
     override func viewWillAppear(_ animated: Bool) {
@@ -64,18 +64,12 @@ class NCAudioRecorderViewController: UIViewController , NCAudioRecorderDelegate
     override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
         super.traitCollectionDidChange(previousTraitCollection)
         
-        setColors(userInterfaceStyle: traitCollection.userInterfaceStyle)
+        changeTheming()
     }
     
     // MARK: - Colors
     
-    func setColors(userInterfaceStyle: UIUserInterfaceStyle?) {
-        
-        if userInterfaceStyle == .dark {
-            // personalized
-        } else {
-            // personalized
-        }
+    func changeTheming() {
         
         view.backgroundColor = .clear
         contentContainerView.backgroundColor = UIColor.lightGray

+ 3 - 9
iOSClient/Main/Create cloud/NCCreateFormUploadAssets.swift

@@ -87,7 +87,7 @@ class NCCreateFormUploadAssets: XLFormViewController, NCSelectDelegate {
             })
         }
         
-        setColors(userInterfaceStyle: nil)
+        changeTheming()
         
         initializeForm()
         reloadForm()
@@ -103,18 +103,12 @@ class NCCreateFormUploadAssets: XLFormViewController, NCSelectDelegate {
     override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
         super.traitCollectionDidChange(previousTraitCollection)
         
-        setColors(userInterfaceStyle: traitCollection.userInterfaceStyle)
+        changeTheming()
     }
     
     // MARK: - Colors
     
-    func setColors(userInterfaceStyle: UIUserInterfaceStyle?) {
-        
-        if userInterfaceStyle == .dark {
-            // personalized
-        } else {
-            // personalized
-        }
+    func changeTheming() {
         
         view.backgroundColor = NCBrandColor.shared.systemGroupedBackground
         tableView.backgroundColor = NCBrandColor.shared.systemGroupedBackground

+ 3 - 9
iOSClient/Main/Create cloud/NCCreateFormUploadConflict.swift

@@ -106,24 +106,18 @@ extension NCCreateFormUploadConflictDelegate {
         buttonContinue.setTitle(NSLocalizedString("_continue_", comment: ""), for: .normal)
         buttonContinue.isEnabled = false
         
-        setColors(userInterfaceStyle: nil)
+        changeTheming()
     }
     
     override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
         super.traitCollectionDidChange(previousTraitCollection)
         
-        setColors(userInterfaceStyle: traitCollection.userInterfaceStyle)
+        changeTheming()
     }
     
     // MARK: - Colors
     
-    func setColors(userInterfaceStyle: UIUserInterfaceStyle?) {
-        
-        if userInterfaceStyle == .dark {
-            // personalized
-        } else {
-            // personalized
-        }
+    func changeTheming(){
         
         view.backgroundColor = NCBrandColor.shared.systemGroupedBackground
         tableView.backgroundColor = NCBrandColor.shared.systemGroupedBackground

+ 3 - 9
iOSClient/Main/Create cloud/NCCreateFormUploadDocuments.swift

@@ -74,7 +74,7 @@ import NCCommunication
         // title 
         self.title = titleForm
       
-        setColors(userInterfaceStyle: nil)
+        changeTheming()
         
         initializeForm()
         
@@ -85,18 +85,12 @@ import NCCommunication
     override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
         super.traitCollectionDidChange(previousTraitCollection)
         
-        setColors(userInterfaceStyle: traitCollection.userInterfaceStyle)
+        changeTheming()
     }
     
     // MARK: - Colors
     
-    func setColors(userInterfaceStyle: UIUserInterfaceStyle?) {
-        
-        if userInterfaceStyle == .dark {
-            // personalized
-        } else {
-            // personalized
-        }
+    func changeTheming() {
         
         view.backgroundColor = NCBrandColor.shared.systemGroupedBackground
         collectionView.backgroundColor = NCBrandColor.shared.systemGroupedBackground

+ 3 - 3
iOSClient/Main/Create cloud/NCCreateFormUploadScanDocument.swift

@@ -81,7 +81,7 @@ class NCCreateFormUploadScanDocument: XLFormViewController, NCSelectDelegate, NC
         //        let rowCell = row.cell(forForm: self)
         //        rowCell.becomeFirstResponder()
         
-        setColors(userInterfaceStyle: nil)
+        changeTheming()
         
         initializeForm()
         
@@ -92,12 +92,12 @@ class NCCreateFormUploadScanDocument: XLFormViewController, NCSelectDelegate, NC
     override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
         super.traitCollectionDidChange(previousTraitCollection)
         
-        setColors(userInterfaceStyle: traitCollection.userInterfaceStyle)
+        changeTheming()
     }
     
     // MARK: - Colors
     
-    func setColors(userInterfaceStyle: UIUserInterfaceStyle?) {
+    func changeTheming() {
         
         if userInterfaceStyle == .dark {
             // personalized

+ 3 - 9
iOSClient/Main/Create cloud/NCCreateFormUploadVoiceNote.swift

@@ -69,7 +69,7 @@ class NCCreateFormUploadVoiceNote: XLFormViewController, NCSelectDelegate, AVAud
         labelTimer.textColor = NCBrandColor.shared.label
         labelDuration.textColor = NCBrandColor.shared.label
         
-        setColors(userInterfaceStyle: nil)
+        changeTheming()
         
         initializeForm()
     }
@@ -83,18 +83,12 @@ class NCCreateFormUploadVoiceNote: XLFormViewController, NCSelectDelegate, AVAud
     override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
         super.traitCollectionDidChange(previousTraitCollection)
         
-        setColors(userInterfaceStyle: traitCollection.userInterfaceStyle)
+        changeTheming()
     }
     
     // MARK: - Colors
     
-    func setColors(userInterfaceStyle: UIUserInterfaceStyle?) {
-        
-        if userInterfaceStyle == .dark {
-            // personalized
-        } else {
-            // personalized
-        }
+    func changeTheming() {
         
         view.backgroundColor = NCBrandColor.shared.systemGroupedBackground
         tableView.backgroundColor = NCBrandColor.shared.systemGroupedBackground