瀏覽代碼

test

Signed-off-by: marinofaggiana <marino@marinofaggiana.com>
marinofaggiana 3 年之前
父節點
當前提交
c5698ab029
共有 1 個文件被更改,包括 6 次插入6 次删除
  1. 6 6
      iOSClient/Viewer/NCViewerMedia/NCViewerMedia.swift

+ 6 - 6
iOSClient/Viewer/NCViewerMedia/NCViewerMedia.swift

@@ -199,11 +199,11 @@ class NCViewerMedia: UIViewController {
                 etagResource = metadata.etagResource
             }
                
-            DispatchQueue.main.async { NCUtility.shared.startActivityIndicator(backgroundView: self.viewerMediaPage?.view, blurEffect: false, bottom: 50, style: .gray) }
+//            DispatchQueue.main.async { NCUtility.shared.startActivityIndicator(backgroundView: self.viewerMediaPage?.view, blurEffect: false, bottom: 50, style: .gray) }
 
             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
                      
-                NCUtility.shared.stopActivityIndicator()
+//                NCUtility.shared.stopActivityIndicator()
 
                 if errorCode == 0 && imageIcon != nil {
                     NCManageDatabase.shared.setMetadataEtagResource(ocId: metadata.ocId, etagResource: etag)
@@ -230,13 +230,13 @@ class NCViewerMedia: UIViewController {
             
             if (CCUtility.getAutomaticDownloadImage() || (metadata.contentType == "image/heic" &&  metadata.hasPreview == false) || ext == "GIF" || ext == "SVG" || isFolderEncrypted) && (metadata.classFile == NCCommunicationCommon.typeClassFile.image.rawValue && !CCUtility.fileProviderStorageExists(metadata.ocId, fileNameView: metadata.fileNameView) && metadata.session == "") {
                 
-                DispatchQueue.main.async { NCUtility.shared.startActivityIndicator(backgroundView: self.viewerMediaPage?.view, blurEffect: false, bottom: 50, style: .gray) }
+//                DispatchQueue.main.async { NCUtility.shared.startActivityIndicator(backgroundView: self.viewerMediaPage?.view, blurEffect: false, bottom: 50, style: .gray) }
 
                 NCNetworking.shared.download(metadata: metadata, selector: "") { (_) in
                     
                     let image = getImageMetadata(metadata)
                     
-                    NCUtility.shared.stopActivityIndicator()
+//                    NCUtility.shared.stopActivityIndicator()
                     
                     DispatchQueue.main.async { completion(metadata.ocId, image) }
                 }
@@ -256,10 +256,10 @@ class NCViewerMedia: UIViewController {
 
             if let metadata = NCManageDatabase.shared.getMetadata(predicate: NSPredicate(format: "account == %@ AND serverUrl == %@ AND fileNameView LIKE[c] %@", metadata.account, metadata.serverUrl, fileName)), !CCUtility.fileProviderStorageExists(metadata.ocId, fileNameView: metadata.fileNameView) {
 
-                DispatchQueue.main.async { NCUtility.shared.startActivityIndicator(backgroundView: self.viewerMediaPage?.view, blurEffect: false, bottom: 50, style: .gray) }
+//                DispatchQueue.main.async { NCUtility.shared.startActivityIndicator(backgroundView: self.viewerMediaPage?.view, blurEffect: false, bottom: 50, style: .gray) }
 
                 NCNetworking.shared.download(metadata: metadata, selector: "") { (_) in
-                    NCUtility.shared.stopActivityIndicator()
+//                    NCUtility.shared.stopActivityIndicator()
                 }
             }
         }