Browse Source

clear code

Marino Faggiana 8 năm trước cách đây
mục cha
commit
f196318f7b
3 tập tin đã thay đổi với 5 bổ sung7 xóa
  1. 1 1
      iOSClient/AppDelegate.h
  2. 3 5
      iOSClient/AppDelegate.m
  3. 1 1
      iOSClient/Main/CCMain.m

+ 1 - 1
iOSClient/AppDelegate.h

@@ -159,7 +159,7 @@
 - (void)aspectNavigationControllerBar:(UINavigationBar *)nav encrypted:(BOOL)encrypted online:(BOOL)online hidden:(BOOL)hidden;
 - (void)aspectTabBar:(UITabBar *)tab hidden:(BOOL)hidden;
 - (void)plusButtonVisibile:(BOOL)visible;
-- (void)settingThemingColor:(NSString *)capabilitiesColor;
+- (void)settingThemingColor;
 
 // Operation Networking
 - (void)cancelAllOperations;

+ 3 - 5
iOSClient/AppDelegate.m

@@ -204,7 +204,7 @@
     self.player.delegate = self;
     
     // Theming Color
-    [self settingThemingColor:nil];
+    [self settingThemingColor];
     
     // ico Image Cache
     self.icoImagesCache = [[NSMutableDictionary alloc] init];
@@ -982,7 +982,7 @@
 #pragma mark ===== Theming Color =====
 #pragma --------------------------------------------------------------------------------------------
 
-- (void)settingThemingColor:(NSString *)capabilitiesColor
+- (void)settingThemingColor
 {
     if (self.activeAccount.length > 0) {
     
@@ -991,9 +991,7 @@
         if (k_option_use_themingColor && tableCapabilities.themingColor.length > 0) {
         
             [NCBrandColor sharedInstance].brand = [CCGraphics colorFromHexString:tableCapabilities.themingColor];
-            
-            if (![capabilitiesColor isEqualToString:tableCapabilities.themingColor])
-                [[NSNotificationCenter defaultCenter] postNotificationName:@"changeTheming" object:nil];
+            [[NSNotificationCenter defaultCenter] postNotificationName:@"changeTheming" object:nil];
         }
     }
     

+ 1 - 1
iOSClient/Main/CCMain.m

@@ -1188,7 +1188,7 @@
 - (void)getCapabilitiesOfServerSuccess:(OCCapabilities *)capabilities
 {
     // Change Theming color
-    [app settingThemingColor:capabilities.themingColor];
+    [app settingThemingColor];
     [CCCoreData addCapabilities:capabilities account:app.activeAccount];
     
     // Download Theming Background