Browse Source

new image nonetwork

marinofaggiana 5 years ago
parent
commit
89e873b286

+ 15 - 0
iOSClient/Images.xcassets/nonetwork.imageset/Contents.json

@@ -0,0 +1,15 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "nonetwork.pdf"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  },
+  "properties" : {
+    "preserves-vector-representation" : true
+  }
+}

BIN
iOSClient/Images.xcassets/nonetwork.imageset/nonetwork.pdf


+ 8 - 28
iOSClient/Main/CCMain.m

@@ -575,41 +575,21 @@
 
 - (UIImage *)getImageLogoHome
 {
+    UIImage *image = [UIImage imageNamed:@"themingLogo"];
+    
     if ([NCBrandOptions sharedInstance].use_themingLogo) {
         
-        return [UIImage imageNamed:@"themingLogo"];
-        
-        /*
-        UIImage *imageThemingLogo = [UIImage imageNamed:@"themingLogo"];
-        NSInteger multiplier = 2;
-        NSString *fileNameThemingLogo = [NSString stringWithFormat:@"%@/%@-themingLogo.png", [CCUtility getDirectoryUserData], [CCUtility getStringUser:appDelegate.activeUser activeUrl:appDelegate.activeUrl]];
-        
-        UIImage *image = [UIImage imageWithContentsOfFile:fileNameThemingLogo];
-        if (image != nil) {
-            imageThemingLogo = image;
-            multiplier = 1;
-        }
+        image = [UIImage imageWithContentsOfFile:[NSString stringWithFormat:@"%@/%@-themingLogo.png", [CCUtility getDirectoryUserData], [CCUtility getStringUser:appDelegate.activeUser activeUrl:appDelegate.activeUrl]]];
+        if (image == nil) image = [UIImage imageNamed:@"themingLogo"];
+    }
         
-        if ([appDelegate.reachability isReachable] == NO) {
-            
-            return [CCGraphics changeThemingColorImage:imageThemingLogo multiplier:multiplier color:NCBrandColor.sharedInstance.icon];
+    if ([appDelegate.reachability isReachable] == NO) {
             
-        } else {
+        return [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"nonetwork"] width:50 height:50 color:NCBrandColor.sharedInstance.icon];
             
-            return [CCGraphics changeThemingColorImage:imageThemingLogo multiplier:multiplier color:NCBrandColor.sharedInstance.brandText];
-        }
-        */
-        
     } else {
         
-        if ([appDelegate.reachability isReachable] == NO) {
-            
-            return [UIImage imageNamed:@"themingLogo"];
-            
-        } else {
-            
-            return [UIImage imageNamed:@"themingLogo"];
-        }
+        return image;
     }
 }