marinofaggiana 5 年之前
父節點
當前提交
7405028710
共有 1 個文件被更改,包括 10 次插入3 次删除
  1. 10 3
      iOSClient/Viewer/NCViewerImage/NCViewerImageCommon.swift

+ 10 - 3
iOSClient/Viewer/NCViewerImage/NCViewerImageCommon.swift

@@ -29,10 +29,17 @@ class NCViewerImageCommon: NSObject {
         return instance
     }()
     
-    static let offOutlineAudio = CCGraphics.changeThemingColorImage(UIImage.init(named: "offOutlineAudio"), width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.height, color: NCBrandColor.sharedInstance.brand)
-    static let offOutlineVideo = CCGraphics.changeThemingColorImage(UIImage.init(named: "offOutlineVideo"), width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.height, color: NCBrandColor.sharedInstance.brand)
-    static let offOutlineImage = CCGraphics.changeThemingColorImage(UIImage.init(named: "offOutlineImage"), width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.height, color: NCBrandColor.sharedInstance.brand)
+    static var offOutlineAudio: UIImage?
+    static var offOutlineVideo: UIImage?
+    static var offOutlineImage: UIImage?
 
+    override init() {
+        NCViewerImageCommon.offOutlineAudio = CCGraphics.changeThemingColorImage(UIImage.init(named: "offOutlineAudio"), width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width, color: NCBrandColor.sharedInstance.brand)
+        NCViewerImageCommon.offOutlineVideo = CCGraphics.changeThemingColorImage(UIImage.init(named: "offOutlineVideo"), width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width, color: NCBrandColor.sharedInstance.brand)
+        NCViewerImageCommon.offOutlineImage = CCGraphics.changeThemingColorImage(UIImage.init(named: "offOutlineImage"), width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.width, color: NCBrandColor.sharedInstance.brand)
+    }
+    
+    
     func getMetadatasDatasource(metadata: tableMetadata?, metadatas: [tableMetadata],favoriteDatasorce: Bool, mediaDatasorce: Bool, offLineDatasource: Bool) -> [tableMetadata]? {
         guard let metadata = metadata else { return nil }
         if favoriteDatasorce {