marinofaggiana 4 年之前
父節點
當前提交
25d19cc643
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      iOSClient/Viewer/NCViewerPeekPop.swift

+ 2 - 2
iOSClient/Viewer/NCViewerPeekPop.swift

@@ -44,12 +44,12 @@ class NCViewerPeekPop: UIViewController  {
         if metadata.directory {
 
             imageView.image = UIImage(named: "folder")!.image(color: NCBrandColor.shared.brandElement, size: standardSizeWidth)
-            if let image = imageView.image { preferredContentSize = CGSize(width: image.size.width,  height: image.size.height) }
+            preferredContentSize = imageView.frame.size
 
         } else {
             
             imageView.image = UIImage.init(named: metadata.iconName)?.resizeImage(size: CGSize(width: standardSizeWidth, height: standardSizeHeight), isAspectRation: true)
-            if let image = imageView.image { preferredContentSize = CGSize(width: image.size.width,  height: image.size.height) }
+            preferredContentSize = imageView.frame.size
         
             if metadata.hasPreview {