Procházet zdrojové kódy

new icon NCGridMediaCell

marinofaggiana před 6 roky
rodič
revize
262b5749cd
1 změnil soubory, kde provedl 9 přidání a 1 odebrání
  1. 9 1
      iOSClient/Main/NCMainCommon.swift

+ 9 - 1
iOSClient/Main/NCMainCommon.swift

@@ -214,7 +214,15 @@ class NCMainCommon: NSObject, PhotoEditorDelegate {
         var imagePreview = false
         
         if metadata.iconName.count > 0 {
-            image = UIImage.init(named: metadata.iconName)
+            if cell is NCGridMediaCell {
+                if metadata.typeFile == k_metadataTypeFile_video {
+                    image = UIImage.init(named: "file_video_big")
+                } else {
+                    image = UIImage.init(named: "file_photo_big")
+                }
+            } else {
+                image = UIImage.init(named: metadata.iconName)
+            }
         } else {
             image = UIImage.init(named: "file")
         }