marinofaggiana 5 年之前
父節點
當前提交
ed6ddc9aa4
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      iOSClient/Main/NCDetailViewController.swift

+ 2 - 3
iOSClient/Main/NCDetailViewController.swift

@@ -317,11 +317,10 @@ class NCDetailViewController: UIViewController, MediaBrowserViewControllerDelega
                     try data!.write(to: url, options: .atomic)
                     completion(index, UIImage.init(data: data!), ZoomScale.default, nil)
                 } catch {
+                    completion(index, CCGraphics.changeThemingColorImage(UIImage.init(named: "imageOffOutline"), width: self.view.frame.width, height: self.view.frame.width, color: NCBrandColor.sharedInstance.brand), ZoomScale.default, nil)
                 }
             } else {
-                let size = self.backgroundView.frame.width
-                let image = CCGraphics.changeThemingColorImage(UIImage.init(named: "imageOffOutline"), width: size, height: size, color: NCBrandColor.sharedInstance.brand)
-                completion(index, image, ZoomScale.default, nil)
+                completion(index, CCGraphics.changeThemingColorImage(UIImage.init(named: "imageOffOutline"), width: self.view.frame.width, height: self.view.frame.width, color: NCBrandColor.sharedInstance.brand), ZoomScale.default, nil)
             }
         }
     }