Marino Faggiana 8 년 전
부모
커밋
b56c89957a
3개의 변경된 파일11개의 추가작업 그리고 6개의 파일을 삭제
  1. 5 4
      iOSClient/AppDelegate.m
  2. 3 1
      iOSClient/Main/CCMain.m
  3. 3 1
      iOSClient/Main/CCMore.swift

+ 5 - 4
iOSClient/AppDelegate.m

@@ -995,17 +995,18 @@
 
 - (void)changeTheming:(UIViewController *)vc
 {
+    UIColor *color = [NCBrandColor sharedInstance].brand;
+    
     // Change Navigation & TabBar color
-    vc.navigationController.navigationBar.barTintColor = [NCBrandColor sharedInstance].brand;
-    vc.tabBarController.tabBar.barTintColor = [NCBrandColor sharedInstance].tabBar;
-    vc.tabBarController.tabBar.tintColor = [NCBrandColor sharedInstance].brand;
+    vc.navigationController.navigationBar.barTintColor = color;
+    vc.tabBarController.tabBar.tintColor = color;
     
     // Change button Plus
     UISplitViewController *splitViewController = (UISplitViewController *)self.window.rootViewController;
     UITabBarController *tabBarController = [splitViewController.viewControllers firstObject];
     
     UIButton *button = [tabBarController.view viewWithTag:99];
-    UIImage *buttonImage = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"tabBarPlus"] color:[NCBrandColor sharedInstance].brand];
+    UIImage *buttonImage = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"tabBarPlus"] color:color];
     
     [button setBackgroundImage:buttonImage forState:UIControlStateNormal];
     [button setBackgroundImage:buttonImage forState:UIControlStateHighlighted];

+ 3 - 1
iOSClient/Main/CCMain.m

@@ -1201,9 +1201,11 @@
 
 - (void)getCapabilitiesOfServerSuccess:(OCCapabilities *)capabilities
 {
+    // Update capabilities db
+    [CCCoreData addCapabilities:capabilities account:app.activeAccount];
+    
     // Change Theming color
     [app settingThemingColorBrand];
-    [CCCoreData addCapabilities:capabilities account:app.activeAccount];
     
     // Download Theming Background
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{

+ 3 - 1
iOSClient/Main/CCMore.swift

@@ -207,7 +207,9 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
     
     func changeTheming() {
         
-        appDelegate.changeTheming(self)
+        if (self.isViewLoaded && (self.view.window != nil)) {
+            appDelegate.changeTheming(self)
+        }
     }
     
     func numberOfSections(in tableView: UITableView) -> Int {