Browse Source

fix dark mode

marinofaggiana 5 years ago
parent
commit
4345a746ed

+ 1 - 10
iOSClient/Activity/NCActivity.swift

@@ -75,11 +75,6 @@ class NCActivity: UIViewController, DZNEmptyDataSetSource, DZNEmptyDataSetDelega
     
     @objc func changeTheming() {
         appDelegate.changeTheming(self, tableView: tableView, collectionView: nil)
-        if filterFileId == nil {
-            tableView.backgroundColor = NCBrandColor.sharedInstance.backgroundView
-        } else {
-            tableView.backgroundColor = NCBrandColor.sharedInstance.backgroundForm
-        }
     }
     
     // MARK: DZNEmpty
@@ -155,11 +150,7 @@ extension NCActivity: UITableViewDelegate {
     func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
         
         let view = UIView(frame: CGRect(x: 0, y: 0, width: tableView.bounds.width, height: 60))
-        if filterFileId == nil {
-            view.backgroundColor = NCBrandColor.sharedInstance.backgroundView
-        } else {
-            view.backgroundColor = NCBrandColor.sharedInstance.backgroundForm
-        }
+        view.backgroundColor = .clear
         
         let label = UILabel()
         label.font = UIFont.boldSystemFont(ofSize: 16)

+ 10 - 1
iOSClient/Share/NCShareComments.swift

@@ -67,7 +67,6 @@ class NCShareComments: UIViewController, NCShareCommentsCellDelegate {
         else{
             labelUser.text = tabAccount.displayName
         }
-        labelUser.textColor = NCBrandColor.sharedInstance.textView
         
         let fileNameLocalPath = CCUtility.getDirectoryUserData() + "/" + CCUtility.getStringUser(appDelegate.activeUser, activeUrl: appDelegate.activeUrl) + "-" + appDelegate.activeUser + ".png"
         if FileManager.default.fileExists(atPath: fileNameLocalPath) {
@@ -84,6 +83,10 @@ class NCShareComments: UIViewController, NCShareCommentsCellDelegate {
                 }
             })
         }
+        
+        // changeTheming
+        NotificationCenter.default.addObserver(self, selector: #selector(self.changeTheming), name: NSNotification.Name(rawValue: "changeTheming"), object: nil)
+        changeTheming()
     }
     
     override func viewWillAppear(_ animated: Bool) {
@@ -92,6 +95,12 @@ class NCShareComments: UIViewController, NCShareCommentsCellDelegate {
         reloadData()
     }
     
+    @objc func changeTheming() {
+        appDelegate.changeTheming(self, tableView: tableView, collectionView: nil)
+        
+        labelUser.textColor = NCBrandColor.sharedInstance.textView
+    }
+    
     @objc func reloadData() {
         
         guard let metadata = self.metadata else { return }

+ 2 - 3
iOSClient/Share/NCSharePaging.swift

@@ -81,9 +81,8 @@ class NCSharePaging: UIViewController {
         pagingViewController.textColor = NCBrandColor.sharedInstance.textView
         pagingViewController.selectedTextColor = NCBrandColor.sharedInstance.textView
         pagingViewController.indicatorColor = NCBrandColor.sharedInstance.brand
-        
-            
-        (pagingViewController.view as! NCSharePagingView).setupConstraints()        
+        (pagingViewController.view as! NCSharePagingView).setupConstraints()
+        pagingViewController.reloadMenu()
     }
     
     @objc func exitTapped() {