marinofaggiana 5 years ago
parent
commit
337a02f130

+ 1 - 1
iOSClient/Activity/NCActivity.swift

@@ -56,7 +56,7 @@ class NCActivity: UIViewController, DZNEmptyDataSetSource, DZNEmptyDataSetDelega
         tableView.contentInset = insets
         
         // Color
-        appDelegate.aspectNavigationControllerBar(self.navigationController?.navigationBar, online: appDelegate.reachability.isReachable(), hidden: false)
+        appDelegate.aspectNavigationControllerBar(self.navigationController?.navigationBar)
         appDelegate.aspectTabBar(self.tabBarController?.tabBar, hidden: false)
         if filterFileId == nil {
             tableView.backgroundColor = NCBrandColor.sharedInstance.backgroundView

+ 1 - 1
iOSClient/AppDelegate.h

@@ -158,7 +158,7 @@
 
 // TabBarController
 - (void)createTabBarController:(UITabBarController *)tabBarController;
-- (void)aspectNavigationControllerBar:(UINavigationBar *)nav online:(BOOL)online hidden:(BOOL)hidden;
+- (void)aspectNavigationControllerBar:(UINavigationBar *)nav;
 - (void)aspectTabBar:(UITabBar *)tab hidden:(BOOL)hidden;
 - (void)plusButtonVisibile:(BOOL)visible;
 - (void)selectedTabBarController:(NSInteger)index;

+ 3 - 5
iOSClient/AppDelegate.m

@@ -894,7 +894,7 @@ PKPushRegistry *pushRegistry;
     [tabBarController.view addConstraint:constraint];
 }
 
-- (void)aspectNavigationControllerBar:(UINavigationBar *)nav online:(BOOL)online hidden:(BOOL)hidden
+- (void)aspectNavigationControllerBar:(UINavigationBar *)nav
 {
     nav.translucent = NO;
     nav.barTintColor = NCBrandColor.sharedInstance.brand;
@@ -903,11 +903,9 @@ PKPushRegistry *pushRegistry;
     // Change bar bottom line shadow
     nav.shadowImage = [CCGraphics generateSinglePixelImageWithColor:NCBrandColor.sharedInstance.brand];
     
-    if (!online)
+    if (![self.reachability isReachable])
         [nav setTitleTextAttributes:@{NSForegroundColorAttributeName : NCBrandColor.sharedInstance.connectionNo}];
-    
-    nav.hidden = hidden;
-    
+        
     [nav setAlpha:1];
 }
 

+ 1 - 1
iOSClient/Favorites/CCFavorites.m

@@ -102,7 +102,7 @@
     [super viewWillAppear:animated];
     
     // Color
-    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar online:[appDelegate.reachability isReachable] hidden:NO];
+    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar];
     [appDelegate aspectTabBar:self.tabBarController.tabBar hidden:NO];
     self.tableView.backgroundColor = NCBrandColor.sharedInstance.backgroundView;
     self.tableView.separatorColor = NCBrandColor.sharedInstance.separator;

+ 1 - 1
iOSClient/Main/CCDetail.m

@@ -92,7 +92,7 @@
     self.navigationController.navigationBar.topItem.title = @"";
     
     // Color Navigation Controller
-    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar online:[appDelegate.reachability isReachable] hidden:NO];
+    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar];
 
     // TabBar
     self.tabBarController.tabBar.hidden = YES;

+ 4 - 4
iOSClient/Main/CCMain.m

@@ -170,7 +170,7 @@
         return;
     
     // Color
-    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar online:[appDelegate.reachability isReachable] hidden:NO];
+    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar];
     [appDelegate aspectTabBar:self.tabBarController.tabBar hidden:NO];
     self.tableView.backgroundColor = NCBrandColor.sharedInstance.backgroundView;
     self.tableView.separatorColor = NCBrandColor.sharedInstance.separator;
@@ -540,7 +540,7 @@
 - (void)setTitle
 {
     // Color text self.navigationItem.title
-    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar online:[appDelegate.reachability isReachable] hidden:NO];
+    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar];
     
     if (_isSelectedMode) {
         
@@ -620,7 +620,7 @@
 
 - (void)setUINavigationBarDefault
 {
-    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar online:[appDelegate.reachability isReachable] hidden:NO];
+    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar];
     
     UIBarButtonItem *buttonMore, *buttonNotification;
     
@@ -649,7 +649,7 @@
 
 - (void)setUINavigationBarSelected
 {
-    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar online:[appDelegate.reachability isReachable] hidden:NO];
+    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar];
     
     UIImage *icon = [UIImage imageNamed:@"navigationControllerMenu"];
     UIBarButtonItem *buttonMore = [[UIBarButtonItem alloc] initWithImage:icon style:UIBarButtonItemStylePlain target:self action:@selector(toggleReSelectMenu)];

+ 1 - 1
iOSClient/Main/CCMore.swift

@@ -189,7 +189,7 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
         self.navigationItem.title = NSLocalizedString("_more_", comment: "")
         
         // Aspect
-        appDelegate.aspectNavigationControllerBar(self.navigationController?.navigationBar, online: appDelegate.reachability.isReachable(), hidden: false)
+        appDelegate.aspectNavigationControllerBar(self.navigationController?.navigationBar)
         appDelegate.aspectTabBar(self.tabBarController?.tabBar, hidden: false)
 
         // +

+ 2 - 2
iOSClient/Main/CCSplit.m

@@ -67,7 +67,7 @@
     
     // Settings Navigation Controller
     UINavigationController *navigationController = [self.viewControllers lastObject];
-    [appDelegate aspectNavigationControllerBar:navigationController.navigationBar online:YES hidden:NO];
+    [appDelegate aspectNavigationControllerBar:navigationController.navigationBar];
     
     [self inizialize];    
 }
@@ -196,7 +196,7 @@
     UINavigationController *secondaryNC = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"CCDetailNC"];
     
     // Color
-    [appDelegate aspectNavigationControllerBar:secondaryNC.navigationBar online:YES hidden:NO];
+    [appDelegate aspectNavigationControllerBar:secondaryNC.navigationBar];
     
     // Ensure back button is enabled
     UIViewController *detailViewController = [secondaryNC visibleViewController];

+ 1 - 1
iOSClient/Media/NCMedia.swift

@@ -107,7 +107,7 @@ class NCMedia: UIViewController, DropdownMenuDelegate, DZNEmptyDataSetSource, DZ
         super.viewWillAppear(animated)
         
         // Aspect Color
-        appDelegate.aspectNavigationControllerBar(self.navigationController?.navigationBar, online: appDelegate.reachability.isReachable(), hidden: false)
+        appDelegate.aspectNavigationControllerBar(self.navigationController?.navigationBar)
         appDelegate.aspectTabBar(self.tabBarController?.tabBar, hidden: false)
         collectionView.backgroundColor = NCBrandColor.sharedInstance.backgroundView
         

+ 1 - 1
iOSClient/Offline/NCOffline.swift

@@ -114,7 +114,7 @@ class NCOffline: UIViewController, UIGestureRecognizerDelegate, NCListCellDelega
         super.viewWillAppear(animated)
         
         // Color
-        appDelegate.aspectNavigationControllerBar(self.navigationController?.navigationBar, online: appDelegate.reachability.isReachable(), hidden: false)
+        appDelegate.aspectNavigationControllerBar(self.navigationController?.navigationBar)
         appDelegate.aspectTabBar(self.tabBarController?.tabBar, hidden: false)
         collectionView.backgroundColor = NCBrandColor.sharedInstance.backgroundView
         

+ 1 - 1
iOSClient/ScanDocument/ScanCollectionView.swift

@@ -93,7 +93,7 @@ class DragDropViewController: UIViewController {
     override func viewWillAppear(_ animated: Bool) {
         super.viewWillAppear(animated)
         
-        appDelegate.aspectNavigationControllerBar(self.navigationController?.navigationBar, online: appDelegate.reachability.isReachable(), hidden: false)
+        appDelegate.aspectNavigationControllerBar(self.navigationController?.navigationBar)
         
         labelTitlePDFzone.textColor = NCBrandColor.sharedInstance.brandText
         labelTitlePDFzone.backgroundColor = NCBrandColor.sharedInstance.brand

+ 1 - 1
iOSClient/Select/NCSelect.swift

@@ -135,7 +135,7 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, NCListCellDelegat
         super.viewWillAppear(animated)
         
         // Color
-        appDelegate.aspectNavigationControllerBar(self.navigationController?.navigationBar, online: appDelegate.reachability.isReachable(), hidden: false)
+        appDelegate.aspectNavigationControllerBar(self.navigationController?.navigationBar)
         toolbar.barTintColor = NCBrandColor.sharedInstance.tabBar
         toolbar.tintColor = NCBrandColor.sharedInstance.textView
         

+ 2 - 2
iOSClient/Settings/Acknowledgements.m

@@ -38,7 +38,7 @@
     
     appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
 
-    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar online:[appDelegate.reachability isReachable] hidden:NO];
+    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar];
     self.navigationController.navigationBar.translucent = false;
     
     NSURL *rtfPath;
@@ -64,7 +64,7 @@
     [super viewDidAppear:animated];
     
     // Color
-    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar online:[appDelegate.reachability isReachable] hidden:NO];
+    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar];
     
     [self.txtTermini setContentOffset:CGPointZero animated:NO];
     self.txtTermini.hidden = false;

+ 1 - 1
iOSClient/Settings/CCAdvanced.m

@@ -167,7 +167,7 @@
     self.tableView.showsVerticalScrollIndicator = NO;
     self.tableView.separatorColor = NCBrandColor.sharedInstance.separator;
 
-    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar online:[appDelegate.reachability isReachable] hidden:NO];
+    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar];
     [appDelegate aspectTabBar:self.tabBarController.tabBar hidden:NO];
 }
 

+ 1 - 1
iOSClient/Settings/CCManageAccount.m

@@ -345,7 +345,7 @@
     self.tableView.showsVerticalScrollIndicator = NO;
     self.tableView.separatorColor = NCBrandColor.sharedInstance.separator;
 
-    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar online:[appDelegate.reachability isReachable] hidden:NO];
+    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar];
     [appDelegate aspectTabBar:self.tabBarController.tabBar hidden:NO];    
 }
 

+ 1 - 1
iOSClient/Settings/CCManageAutoUpload.m

@@ -199,7 +199,7 @@
     self.tableView.separatorColor = NCBrandColor.sharedInstance.separator;
 
     // Color
-    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar online:[appDelegate.reachability isReachable] hidden:NO];
+    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar];
     [appDelegate aspectTabBar:self.tabBarController.tabBar hidden:NO];
     
     // Request permission for camera roll access

+ 3 - 3
iOSClient/Settings/CCSettings.m

@@ -209,7 +209,7 @@
     self.tableView.showsVerticalScrollIndicator = NO;
     self.tableView.separatorColor = NCBrandColor.sharedInstance.separator;
 
-    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar online:[appDelegate.reachability isReachable] hidden:NO];
+    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar];
     [appDelegate aspectTabBar:self.tabBarController.tabBar hidden:NO];
 
     [self reloadForm];
@@ -320,7 +320,7 @@
         
         [appDelegate settingDarkMode];
         
-        [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar online:[appDelegate.reachability isReachable] hidden:NO];
+        [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar];
         [appDelegate aspectTabBar:self.tabBarController.tabBar hidden:NO];
         self.tableView.backgroundColor = NCBrandColor.sharedInstance.backgroundView;
         [self initializeForm];
@@ -349,7 +349,7 @@
             
             [appDelegate settingDarkMode];
             
-            [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar online:[appDelegate.reachability isReachable] hidden:NO];
+            [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar];
             [appDelegate aspectTabBar:self.tabBarController.tabBar hidden:NO];
             self.tableView.backgroundColor = NCBrandColor.sharedInstance.backgroundView;
             [self initializeForm];

+ 1 - 1
iOSClient/Settings/NCManageEndToEndEncryption.m

@@ -177,7 +177,7 @@
     self.tableView.showsVerticalScrollIndicator = NO;
     self.tableView.separatorColor = NCBrandColor.sharedInstance.separator;
     
-    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar online:[appDelegate.reachability isReachable] hidden:NO];
+    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar];
     [appDelegate aspectTabBar:self.tabBarController.tabBar hidden:NO];
 }
 

+ 1 - 1
iOSClient/Shares/NCShares.m

@@ -81,7 +81,7 @@
     [super viewWillAppear:animated];
     
     // Color
-    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar online:[appDelegate.reachability isReachable] hidden:NO];
+    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar];
     [appDelegate aspectTabBar:self.tabBarController.tabBar hidden:NO];
     self.tableView.backgroundColor = NCBrandColor.sharedInstance.backgroundView;
     self.tableView.separatorColor = NCBrandColor.sharedInstance.separator;

+ 1 - 1
iOSClient/Transfers/CCTransfers.m

@@ -94,7 +94,7 @@
     [super viewDidAppear:animated];
         
     // Color
-    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar online:[appDelegate.reachability isReachable] hidden:NO];
+    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar];
     [appDelegate aspectTabBar:self.tabBarController.tabBar hidden:NO];
     
     dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.001 * NSEC_PER_SEC), dispatch_get_main_queue(), ^(void) {

+ 1 - 1
iOSClient/Trash/NCTrash.swift

@@ -87,7 +87,7 @@ class NCTrash: UIViewController, UIGestureRecognizerDelegate, NCTrashListCellDel
         super.viewWillAppear(animated)
         
         // Color
-        appDelegate.aspectNavigationControllerBar(self.navigationController?.navigationBar, online: appDelegate.reachability.isReachable(), hidden: false)
+        appDelegate.aspectNavigationControllerBar(self.navigationController?.navigationBar)
         appDelegate.aspectTabBar(self.tabBarController?.tabBar, hidden: false)
         collectionView.backgroundColor = NCBrandColor.sharedInstance.backgroundView
         

+ 1 - 1
iOSClient/UploadFromOtherUpp/CCUploadFromOtherUpp.m

@@ -49,7 +49,7 @@
     destinationTitle = NSLocalizedString(@"_home_", nil);
     
     // Color
-    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar online:[appDelegate.reachability isReachable] hidden:NO];
+    [appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar];
     [appDelegate aspectTabBar:self.tabBarController.tabBar hidden:NO];
 }