marinofaggiana 5 years ago
parent
commit
279edf12a7

+ 1 - 1
iOSClient/AppDelegate.h

@@ -171,7 +171,7 @@
 
 // Theming Color
 - (void)settingThemingColorBrand;
-- (void)changeTheming:(UIViewController *)viewController;
+- (void)changeTheming:(UIViewController *)viewController tableView:(UITableView *)tableView;
 - (void)settingDarkMode;
 
 // Task Networking

+ 8 - 1
iOSClient/AppDelegate.m

@@ -1028,7 +1028,7 @@ PKPushRegistry *pushRegistry;
     [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"changeTheming" object:nil];
 }
 
-- (void)changeTheming:(UIViewController *)viewController
+- (void)changeTheming:(UIViewController *)viewController tableView:(UITableView *)tableView
 {
     // Change Navigation & TabBar color
     viewController.navigationController.navigationBar.barTintColor = NCBrandColor.sharedInstance.brand;
@@ -1050,6 +1050,13 @@ PKPushRegistry *pushRegistry;
     tabBarController.tabBar.barTintColor = NCBrandColor.sharedInstance.tabBar;
     tabBarController.tabBar.tintColor = NCBrandColor.sharedInstance.brandElement;
             
+    // TableView
+    if (tableView) {
+        tableView.backgroundColor = NCBrandColor.sharedInstance.backgroundView;
+        tableView.separatorColor = NCBrandColor.sharedInstance.separator;
+        [tableView reloadData];
+    }
+    
     // Tint Color GLOBAL WINDOW
     [self.window setTintColor:NCBrandColor.sharedInstance.textView];
 }

+ 1 - 1
iOSClient/Favorites/CCFavorites.m

@@ -126,7 +126,7 @@
 - (void)changeTheming
 {
     if (self.isViewLoaded && self.view.window)
-        [appDelegate changeTheming:self];
+        [appDelegate changeTheming:self tableView:self.tableView];
     
     // Reload Table View
     [self.tableView reloadData];

+ 1 - 1
iOSClient/Main/CCDetail.m

@@ -140,7 +140,7 @@
 
 - (void)changeTheming
 {
-    [appDelegate changeTheming:self];
+    [appDelegate changeTheming:self tableView:nil];
     
     if (self.toolbar) {
         self.toolbar.barTintColor = NCBrandColor.sharedInstance.tabBar;

+ 1 - 1
iOSClient/Main/CCMain.m

@@ -279,7 +279,7 @@
 - (void)changeTheming
 {
     if (self.isViewLoaded && self.view.window)
-        [appDelegate changeTheming:self];
+        [appDelegate changeTheming:self tableView:self.tableView];
     
     // Refresh control
     refreshControl.tintColor = NCBrandColor.sharedInstance.brandText;

+ 3 - 9
iOSClient/Main/CCMore.swift

@@ -58,10 +58,6 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
         tableView.delegate = self
         tableView.dataSource = self
         
-        if #available(iOS 11, *) {
-            //tableView.contentInsetAdjustmentBehavior = .never
-        }
-        
         themingBackground.image = #imageLiteral(resourceName: "themingBackground")
         
         // create tap gesture recognizer
@@ -186,10 +182,7 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
         // User data & Theming
         changeUserProfile()
         changeTheming()
-        tableView.backgroundColor = NCBrandColor.sharedInstance.backgroundView;
-        viewQuota.backgroundColor = NCBrandColor.sharedInstance.backgroundView;
-        tableView.separatorColor = NCBrandColor.sharedInstance.separator
-
+    
         // Title
         self.navigationItem.title = NSLocalizedString("_more_", comment: "")
         
@@ -228,7 +221,8 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
         disclosureIndicator.image = CCGraphics.changeThemingColorImage(disclosureIndicator.image, width: 48, height: 52, color: NCBrandColor.sharedInstance.brandText)
         
         if (self.isViewLoaded && (self.view.window != nil)) {
-            appDelegate.changeTheming(self)
+            appDelegate.changeTheming(self, tableView: tableView)
+            viewQuota.backgroundColor = NCBrandColor.sharedInstance.backgroundView;
         }
     }
     

+ 3 - 3
iOSClient/Main/Main.storyboard

@@ -487,12 +487,12 @@
                             </imageView>
                             <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" rowHeight="50" sectionHeaderHeight="1" sectionFooterHeight="1" translatesAutoresizingMaskIntoConstraints="NO" id="aKC-5k-tLM">
                                 <rect key="frame" x="0.0" y="188" width="414" height="573"/>
-                                <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <prototypes>
-                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="Cell" rowHeight="50" id="V1G-2M-Q0I" customClass="CCCellMore" customModule="Nextcloud" customModuleProvider="target">
+                                    <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="Cell" rowHeight="50" id="V1G-2M-Q0I" customClass="CCCellMore" customModule="Nextcloud" customModuleProvider="target">
                                         <rect key="frame" x="0.0" y="55.5" width="414" height="50"/>
                                         <autoresizingMask key="autoresizingMask"/>
-                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="V1G-2M-Q0I" id="mMB-QG-hoe">
+                                        <tableViewCellContentView key="contentView" multipleTouchEnabled="YES" contentMode="center" tableViewCell="V1G-2M-Q0I" id="mMB-QG-hoe">
                                             <rect key="frame" x="0.0" y="0.0" width="414" height="50"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>

+ 1 - 1
iOSClient/Media/NCMedia.swift

@@ -158,7 +158,7 @@ class NCMedia: UIViewController, DropdownMenuDelegate, DZNEmptyDataSetSource, DZ
     @objc func changeTheming() {
         
         if self.isViewLoaded && self.view?.window != nil {
-            appDelegate.changeTheming(self)
+            appDelegate.changeTheming(self, tableView: nil)
         }
     }
 

+ 3 - 2
iOSClient/Settings/CCAdvanced.m

@@ -160,6 +160,8 @@
 {
     [super viewDidLoad];
     
+    self.tableView.showsVerticalScrollIndicator = NO;
+
     _hud = [[CCHud alloc] initWithView:[[[UIApplication sharedApplication] delegate] window]];
 }
 
@@ -169,7 +171,6 @@
     [super viewWillAppear:animated];
     
     self.tableView.backgroundColor = NCBrandColor.sharedInstance.backgroundView;
-    self.tableView.showsVerticalScrollIndicator = NO;
     self.tableView.separatorColor = NCBrandColor.sharedInstance.separator;
 
     // Color
@@ -180,7 +181,7 @@
 - (void)changeTheming
 {
     if (self.isViewLoaded && self.view.window)
-        [appDelegate changeTheming:self];
+        [appDelegate changeTheming:self tableView:self.tableView];
 }
 
 - (void)formRowDescriptorValueHasChanged:(XLFormRowDescriptor *)rowDescriptor oldValue:(id)oldValue newValue:(id)newValue

+ 1 - 1
iOSClient/Settings/CCManageAccount.m

@@ -366,7 +366,7 @@
 
 - (void)changeTheming
 {
-    [appDelegate changeTheming:self];
+    [appDelegate changeTheming:self tableView:self.tableView];
 }
 
 #pragma --------------------------------------------------------------------------------------------

+ 1 - 1
iOSClient/Settings/CCManageAutoUpload.m

@@ -249,7 +249,7 @@
 - (void)changeTheming
 {
     if (self.isViewLoaded && self.view.window)
-        [appDelegate changeTheming:self];
+        [appDelegate changeTheming:self tableView:self.tableView];
 }
 
 -(void)formRowDescriptorValueHasChanged:(XLFormRowDescriptor *)rowDescriptor oldValue:(id)oldValue newValue:(id)newValue

+ 1 - 1
iOSClient/Settings/CCSettings.m

@@ -229,7 +229,7 @@
 - (void)changeTheming
 {
     if (self.isViewLoaded && self.view.window)
-        [appDelegate changeTheming:self];
+        [appDelegate changeTheming:self tableView:self.tableView];
 }
 
 #pragma --------------------------------------------------------------------------------------------

+ 1 - 1
iOSClient/Shares/NCShares.m

@@ -95,7 +95,7 @@
 - (void)changeTheming
 {
     if (self.isViewLoaded && self.view.window)
-        [appDelegate changeTheming:self];
+        [appDelegate changeTheming:self tableView:self.tableView];
     
     // Reload Table View
     [self.tableView reloadData];

+ 1 - 1
iOSClient/Transfers/CCTransfers.m

@@ -105,7 +105,7 @@
 - (void)changeTheming
 {
     if (self.isViewLoaded && self.view.window)
-        [appDelegate changeTheming:self];
+        [appDelegate changeTheming:self tableView:self.tableView];
 }
 
 #pragma --------------------------------------------------------------------------------------------