marinofaggiana 3 vuotta sitten
vanhempi
commit
981cb347bd

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

@@ -88,9 +88,9 @@ class NCCreateFormUploadAssets: XLFormViewController, NCSelectDelegate {
             })
         }
         
-        NotificationCenter.default.addObserver(self, selector: #selector(changeTheming), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterChangeTheming), object: nil)
-
-        changeTheming()
+        tableView.reloadData()
+        initializeForm()
+        reloadForm()
     }
     
     override func viewWillDisappear(_ animated: Bool)
@@ -100,12 +100,6 @@ class NCCreateFormUploadAssets: XLFormViewController, NCSelectDelegate {
         self.delegate?.dismissFormUploadAssets()
     }
     
-    @objc func changeTheming() {
-        tableView.reloadData()
-        initializeForm()
-        self.reloadForm()
-    }
-    
     //MARK: XLForm
     
     func initializeForm() {

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

@@ -79,18 +79,12 @@ import NCCommunication
         // title 
         self.title = titleForm
       
-        NotificationCenter.default.addObserver(self, selector: #selector(changeTheming), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterChangeTheming), object: nil)
-
-        changeTheming()
-        
-        // load the templates available
-        getTemplate()
-    }
-    
-    @objc func changeTheming() {
         collectionView.reloadData()
         tableView.reloadData()
         initializeForm()
+        
+        // load the templates available
+        getTemplate()
     }
     
     // MARK: - Tableview (XLForm)

+ 2 - 8
iOSClient/Main/Create cloud/NCCreateFormUploadScanDocument.swift

@@ -81,19 +81,13 @@ class NCCreateFormUploadScanDocument: XLFormViewController, NCSelectDelegate, NC
         //        let rowCell = row.cell(forForm: self)
         //        rowCell.becomeFirstResponder()
         
-        NotificationCenter.default.addObserver(self, selector: #selector(changeTheming), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterChangeTheming), object: nil)
-
-        changeTheming()
+        tableView.reloadData()
+        initializeForm()
         
         let value = CCUtility.getTextRecognitionStatus()
         SetTextRecognition(newValue: value)
     }
     
-    @objc func changeTheming() {
-        tableView.reloadData()
-        initializeForm()
-    }
-
     //MARK: XLForm
     
     func initializeForm() {

+ 1 - 8
iOSClient/Main/Create cloud/NCCreateFormUploadVoiceNote.swift

@@ -93,9 +93,7 @@ class NCCreateFormUploadVoiceNote: XLFormViewController, NCSelectDelegate, AVAud
         labelTimer.textColor = NCBrandColor.shared.label
         labelDuration.textColor = NCBrandColor.shared.label
         
-        NotificationCenter.default.addObserver(self, selector: #selector(changeTheming), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterChangeTheming), object: nil)
-
-        changeTheming()
+        initializeForm()
     }
     
     override func viewWillAppear(_ animated: Bool) {
@@ -104,11 +102,6 @@ class NCCreateFormUploadVoiceNote: XLFormViewController, NCSelectDelegate, AVAud
         updateTimerUI()
     }
     
-    @objc func changeTheming() {
-        tableView.reloadData()
-        initializeForm()
-    }
-    
     //MARK: XLForm
 
     func initializeForm() {

+ 2 - 9
iOSClient/ScanDocument/ScanCollectionView.swift

@@ -91,17 +91,10 @@ class DragDropViewController: UIViewController {
         let longPressRecognizerPlus = UILongPressGestureRecognizer(target: self, action: #selector(handleLongPressGesture(recognizer:)))
         add.addGestureRecognizer(longPressRecognizerPlus)
         
-        // changeTheming
-        NotificationCenter.default.addObserver(self, selector: #selector(changeTheming), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterChangeTheming), object: nil)
-        
-        changeTheming()
-        
-        loadImage()
-    }
-    
-    @objc func changeTheming() {
         collectionViewSource.reloadData()
         collectionViewDestination.reloadData()
+        
+        loadImage()
     }
     
     //MARK: Button Action