marinofaggiana il y a 4 ans
Parent
commit
2891e87d49
1 fichiers modifiés avec 10 ajouts et 1 suppressions
  1. 10 1
      iOSClient/Main/NCCollectionCommon.swift

+ 10 - 1
iOSClient/Main/NCCollectionCommon.swift

@@ -160,6 +160,11 @@ class NCCollectionCommon: NSObject {
                         cell.imageItem.image = UIImage.init(named: "file")
                     }
                 }
+                if cell.imageItem.image == nil {
+                    cell.imageItem.backgroundColor = .lightGray
+                } else {
+                    cell.imageItem.backgroundColor = nil
+                }
                 
                 cell.labelInfo.text = CCUtility.dateDiff(metadata.date as Date) + " · " + CCUtility.transformedSize(metadata.size)
                 
@@ -277,7 +282,6 @@ class NCCollectionCommon: NSObject {
                 } else {
                     cell.imageItem.image = NCCollectionCommonImages.cellFolderImage
                 }
-                
     
                 let lockServerUrl = CCUtility.stringAppendServerUrl(serverUrl, addFileName: metadata.fileName)!
                 let tableDirectory = NCManageDatabase.sharedInstance.getTableDirectory(predicate: NSPredicate(format: "account == %@ AND serverUrl == %@", appDelegate.account, lockServerUrl))
@@ -298,6 +302,11 @@ class NCCollectionCommon: NSObject {
                         cell.imageItem.image = UIImage.init(named: "file")
                     }
                 }
+                if cell.imageItem.image == nil {
+                    cell.imageItem.backgroundColor = .lightGray
+                } else {
+                    cell.imageItem.backgroundColor = nil
+                }
                 
                 // image Local
                 let tableLocalFile = NCManageDatabase.sharedInstance.getTableLocalFile(predicate: NSPredicate(format: "ocId == %@", metadata.ocId))