Browse Source

fix capabilities themingColor

Marino Faggiana 7 years ago
parent
commit
803bb60cc2

+ 5 - 3
Share/ShareViewController.m

@@ -165,9 +165,11 @@
 
     // Theming
     tableCapabilities *capabilities = [[NCManageDatabase sharedInstance] getCapabilites];
-    if ([NCBrandOptions sharedInstance].use_themingColor && capabilities.themingColor.length > 0)
-        [NCBrandColor sharedInstance].brand = [CCGraphics colorFromHexString:capabilities.themingColor];
-
+    if ([NCBrandOptions sharedInstance].use_themingColor && capabilities.themingColor.length > 0) {
+        UIColor *newColor = [CCGraphics colorFromHexString:capabilities.themingColor];
+        if (newColor)
+            [NCBrandColor sharedInstance].brand = newColor;
+    }
     self.navigationController.navigationBar.barTintColor = [NCBrandColor sharedInstance].brand;
     self.navigationController.navigationBar.tintColor = [NCBrandColor sharedInstance].navigationBarText;
     

+ 1 - 1
iOSClient/AppDelegate.m

@@ -1033,7 +1033,7 @@
         newColor = [NCBrandColor sharedInstance].customer;
     }
     
-    if (self.activeAccount.length > 0 && ![newColor isEqual:[NCBrandColor sharedInstance].brand]) {
+    if (self.activeAccount.length > 0 && ![newColor isEqual:[NCBrandColor sharedInstance].brand] && newColor) {
         
         [NCBrandColor sharedInstance].brand = newColor;
         [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"changeTheming" object:nil];

+ 2 - 2
iOSClient/Brand/Picker.plist

@@ -17,9 +17,9 @@
 	<key>CFBundlePackageType</key>
 	<string>XPC!</string>
 	<key>CFBundleShortVersionString</key>
-	<string>2.17.4</string>
+	<string>2.17.5</string>
 	<key>CFBundleVersion</key>
-	<string>00038</string>
+	<string>00001</string>
 	<key>NSAppTransportSecurity</key>
 	<dict>
 		<key>NSAllowsArbitraryLoads</key>

+ 2 - 2
iOSClient/Brand/PickerFileProvider.plist

@@ -17,9 +17,9 @@
 	<key>CFBundlePackageType</key>
 	<string>XPC!</string>
 	<key>CFBundleShortVersionString</key>
-	<string>2.17.4</string>
+	<string>2.17.5</string>
 	<key>CFBundleVersion</key>
-	<string>00038</string>
+	<string>00001</string>
 	<key>NSExtension</key>
 	<dict>
 		<key>NSExtensionFileProviderDocumentGroup</key>

+ 2 - 2
iOSClient/Brand/Share.plist

@@ -17,9 +17,9 @@
 	<key>CFBundlePackageType</key>
 	<string>XPC!</string>
 	<key>CFBundleShortVersionString</key>
-	<string>2.17.4</string>
+	<string>2.17.5</string>
 	<key>CFBundleVersion</key>
-	<string>00038</string>
+	<string>00001</string>
 	<key>NSAppTransportSecurity</key>
 	<dict>
 		<key>NSAllowsArbitraryLoads</key>

+ 2 - 2
iOSClient/Brand/iOSClient.plist

@@ -46,7 +46,7 @@
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-	<string>2.17.4</string>
+	<string>2.17.5</string>
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleURLTypes</key>
@@ -69,7 +69,7 @@
 		</dict>
 	</array>
 	<key>CFBundleVersion</key>
-	<string>00038</string>
+	<string>00001</string>
 	<key>Fabric</key>
 	<dict>
 		<key>APIKey</key>