Marino Faggiana 8 жил өмнө
parent
commit
a8de00cab4

+ 1 - 1
iOSClient/Brand/NCBrand.swift

@@ -57,6 +57,6 @@ class NCBrandImages: NSObject {
     public var navigationLogo:          String = "navigationLogo"
     public var navigationLogoOffline:   String = "navigationLogoOffline"
     public var BackgroundDetail:        String = "backgroundDetail"
-    public var menuMoreImage:           String = "menuMoreImage"
+    public var themingBackground:       String = "themingBackground"
 }
 

BIN
iOSClient/Images.xcassets/menuMoreImage.imageset/MoreBackground@2x.jpg


+ 1 - 1
iOSClient/Images.xcassets/menuMoreImage.imageset/Contents.json → iOSClient/Images.xcassets/themingBackground.imageset/Contents.json

@@ -6,7 +6,7 @@
     },
     {
       "idiom" : "universal",
-      "filename" : "MoreBackground@2x.jpg",
+      "filename" : "themingBackground@2x.png",
       "scale" : "2x"
     },
     {

BIN
iOSClient/Images.xcassets/themingBackground.imageset/themingBackground@2x.png


+ 11 - 0
iOSClient/Main/CCMain.m

@@ -1193,6 +1193,17 @@
     [app settingThemingColor:capabilities.themingColor];
     [CCCoreData addCapabilities:capabilities account:app.activeAccount];
     
+    // Download Theming Background
+    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{
+        
+        UIImage *themingBackground = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:[capabilities.themingBackground stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]]];
+        if (themingBackground)
+            [UIImagePNGRepresentation(themingBackground) writeToFile:[NSString stringWithFormat:@"%@/themingBackground.png", app.directoryUser] atomically:YES];
+        else
+            [[NSFileManager defaultManager] removeItemAtPath:[NSString stringWithFormat:@"%@/themingBackground.png", app.directoryUser] error:nil];
+    });
+
+    
     // Search bar if change version
     if (app.serverVersion != capabilities.versionMajor) {
     

+ 1 - 2
iOSClient/Main/CCMore.swift

@@ -52,10 +52,9 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
         
         tableView.separatorColor = NCBrandColor.sharedInstance.seperator
         
-        imageLogo.image = UIImage.init(named: NCBrandImages.sharedInstance.menuMoreImage)
+        imageLogo.image = UIImage.init(named: NCBrandImages.sharedInstance.themingBackground)
         
         // create tap gesture recognizer
-
         let tapQuota = UITapGestureRecognizer(target: self, action: #selector(tapLabelQuotaExternalSite))
         labelQuotaExternalSite.isUserInteractionEnabled = true
         labelQuotaExternalSite.addGestureRecognizer(tapQuota)