Просмотр исходного кода

improved image viewer

Signed-off-by: marinofaggiana <marino@marinofaggiana.com>
marinofaggiana 3 лет назад
Родитель
Сommit
c2d6b3866b
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      iOSClient/Viewer/NCViewerMedia/NCViewerMediaPage.swift

+ 5 - 1
iOSClient/Viewer/NCViewerMedia/NCViewerMediaPage.swift

@@ -315,7 +315,11 @@ class NCViewerMediaPage: UIViewController {
             }
             
             NCCommunication.shared.downloadPreview(fileNamePathOrFileId: fileNamePath, fileNamePreviewLocalPath: fileNamePreviewLocalPath , widthPreview: NCGlobal.shared.sizePreview, heightPreview: NCGlobal.shared.sizePreview, fileNameIconLocalPath: fileNameIconLocalPath, sizeIcon: NCGlobal.shared.sizeIcon, etag: etagResource, queue: NCCommunicationCommon.shared.backgroundQueue) { (account, imagePreview, imageIcon, imageOriginal, etag, errorCode, errorDescription) in
-                                
+                     
+                if errorCode == 0 && imageIcon != nil {
+                    NCManageDatabase.shared.setMetadataEtagResource(ocId: metadata.ocId, etagResource: etag)
+                }
+                
                 // Download file max resolution
                 downloadFile(metadata: metadata)
             }