marinofaggiana 5 lat temu
rodzic
commit
eb72672ba0
1 zmienionych plików z 5 dodań i 3 usunięć
  1. 5 3
      iOSClient/Main/NCDetailViewController.swift

+ 5 - 3
iOSClient/Main/NCDetailViewController.swift

@@ -531,17 +531,19 @@ extension NCDetailViewController: NCViewerImageViewControllerDelegate, NCViewerI
             }
                 
         // HEIC
-        } else if metadata.contentType == "image/heic" {
+        } else if metadata.contentType == "image/heic" && CCUtility.fileProviderStorageSize(metadata.ocId, fileNameView: metadata.fileNameView) == 0 {
             
             let serverUrlFileName = metadata.serverUrl + "/" + metadata.fileName
             let fileNameLocalPath = CCUtility.getDirectoryProviderStorageOcId(metadata.ocId, fileNameView: metadata.fileName)!
             
             _ = NCCommunication.sharedInstance.download(serverUrlFileName: serverUrlFileName, fileNameLocalPath: fileNameLocalPath, account: metadata.account, progressHandler: { (progress) in
-                
-                
+                                
+                self.progress(Float(progress.fractionCompleted))
                 
             }) { (account, etag, date, length, errorCode, errorDescription) in
                 
+                self.progress(0)
+                
                 if errorCode == 0 && account == metadata.account {
                     
                     metadata.status = Int(k_metadataStatusNormal)