marinofaggiana 4 years ago
parent
commit
25d19cc643
1 changed files with 2 additions and 2 deletions
  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 {