소스 검색

lint

Signed-off-by: Marino Faggiana <8616947+marinofaggiana@users.noreply.github.com>
Marino Faggiana 1 년 전
부모
커밋
1023a19ceb

+ 8 - 9
iOSClient/Main/Collection Common/NCCollectionViewCommon.swift

@@ -1733,15 +1733,14 @@ class NCCollectionViewDownloadThumbnail: ConcurrentOperation {
             etagResource = metadata.etagResource
         }
 
-        NextcloudKit.shared.downloadPreview(
-            fileNamePathOrFileId: fileNamePath,
-            fileNamePreviewLocalPath: fileNamePreviewLocalPath,
-            widthPreview: NCGlobal.shared.sizePreview,
-            heightPreview: NCGlobal.shared.sizePreview,
-            fileNameIconLocalPath: fileNameIconLocalPath,
-            sizeIcon: NCGlobal.shared.sizeIcon,
-            etag: etagResource,
-            options: NKRequestOptions(queue: NextcloudKit.shared.nkCommonInstance.backgroundQueue)) { _, _, imageIcon, _, etag, error in
+        NextcloudKit.shared.downloadPreview(fileNamePathOrFileId: fileNamePath,
+                                            fileNamePreviewLocalPath: fileNamePreviewLocalPath,
+                                            widthPreview: NCGlobal.shared.sizePreview,
+                                            heightPreview: NCGlobal.shared.sizePreview,
+                                            fileNameIconLocalPath: fileNameIconLocalPath,
+                                            sizeIcon: NCGlobal.shared.sizeIcon,
+                                            etag: etagResource,
+                                            options: NKRequestOptions(queue: NextcloudKit.shared.nkCommonInstance.backgroundQueue)) { _, _, imageIcon, _, etag, error in
 
             if error == .success, let image = imageIcon {
                 NCManageDatabase.shared.setMetadataEtagResource(ocId: self.metadata.ocId, etagResource: etag)

+ 8 - 9
iOSClient/Media/NCMedia.swift

@@ -884,15 +884,14 @@ class NCMediaDownloadThumbnaill: ConcurrentOperation {
             etagResource = metadata.etagResource
         }
 
-        NextcloudKit.shared.downloadPreview(
-            fileNamePathOrFileId: fileNamePath,
-            fileNamePreviewLocalPath: fileNamePreviewLocalPath,
-            widthPreview: NCGlobal.shared.sizePreview,
-            heightPreview: NCGlobal.shared.sizePreview,
-            fileNameIconLocalPath: fileNameIconLocalPath,
-            sizeIcon: NCGlobal.shared.sizeIcon,
-            etag: etagResource,
-            options: NKRequestOptions(queue: NextcloudKit.shared.nkCommonInstance.backgroundQueue)) { _, imagePreview, _, _, etag, error in
+        NextcloudKit.shared.downloadPreview(fileNamePathOrFileId: fileNamePath,
+                                            fileNamePreviewLocalPath: fileNamePreviewLocalPath,
+                                            widthPreview: NCGlobal.shared.sizePreview,
+                                            heightPreview: NCGlobal.shared.sizePreview,
+                                            fileNameIconLocalPath: fileNameIconLocalPath,
+                                            sizeIcon: NCGlobal.shared.sizeIcon,
+                                            etag: etagResource,
+                                            options: NKRequestOptions(queue: NextcloudKit.shared.nkCommonInstance.backgroundQueue)) { _, imagePreview, _, _, etag, error in
 
             if error == .success, let image = imagePreview {
                 NCManageDatabase.shared.setMetadataEtagResource(ocId: self.metadata.ocId, etagResource: etag)

+ 7 - 8
iOSClient/Networking/NCOperationQueue.swift

@@ -139,14 +139,13 @@ class NCOperationDownloadThumbnailActivity: ConcurrentOperation {
 
         guard !isCancelled else { return self.finish() }
 
-        NextcloudKit.shared.downloadPreview(
-            fileNamePathOrFileId: fileNamePathOrFileId,
-            fileNamePreviewLocalPath: fileNamePreviewLocalPath,
-            widthPreview: 0,
-            heightPreview: 0,
-            etag: nil,
-            useInternalEndpoint: false,
-            options: NKRequestOptions(queue: NextcloudKit.shared.nkCommonInstance.backgroundQueue)) { _, imagePreview, _, _, _, error in
+        NextcloudKit.shared.downloadPreview(fileNamePathOrFileId: fileNamePathOrFileId,
+                                            fileNamePreviewLocalPath: fileNamePreviewLocalPath,
+                                            widthPreview: 0,
+                                            heightPreview: 0,
+                                            etag: nil,
+                                            useInternalEndpoint: false,
+                                            options: NKRequestOptions(queue: NextcloudKit.shared.nkCommonInstance.backgroundQueue)) { _, imagePreview, _, _, _, error in
 
             if error == .success, let imagePreview = imagePreview {
                 DispatchQueue.main.async {

+ 16 - 17
iOSClient/Trash/NCTrash.swift

@@ -350,22 +350,21 @@ extension NCTrash {
         let fileNamePreviewLocalPath = CCUtility.getDirectoryProviderStoragePreviewOcId(tableTrash.fileId, etag: tableTrash.fileName)!
         let fileNameIconLocalPath = CCUtility.getDirectoryProviderStorageIconOcId(tableTrash.fileId, etag: tableTrash.fileName)!
 
-        NextcloudKit.shared.downloadPreview(
-            fileNamePathOrFileId: tableTrash.fileId,
-            fileNamePreviewLocalPath: fileNamePreviewLocalPath,
-            widthPreview: NCGlobal.shared.sizePreview,
-            heightPreview: NCGlobal.shared.sizePreview,
-            fileNameIconLocalPath: fileNameIconLocalPath,
-            sizeIcon: NCGlobal.shared.sizeIcon,
-            etag: nil,
-            endpointTrashbin: true) { account, _, imageIcon, _, _, error in
-                guard error == .success, let imageIcon = imageIcon, account == self.appDelegate.account,
-                      let cell = self.collectionView.cellForItem(at: indexPath) else { return }
-                if let cell = cell as? NCTrashListCell {
-                    cell.imageItem.image = imageIcon
-                } else if let cell = cell as? NCGridCell {
-                    cell.imageItem.image = imageIcon
-                } // else: undefined cell
-            }
+        NextcloudKit.shared.downloadPreview(fileNamePathOrFileId: tableTrash.fileId,
+                                            fileNamePreviewLocalPath: fileNamePreviewLocalPath,
+                                            widthPreview: NCGlobal.shared.sizePreview,
+                                            heightPreview: NCGlobal.shared.sizePreview,
+                                            fileNameIconLocalPath: fileNameIconLocalPath,
+                                            sizeIcon: NCGlobal.shared.sizeIcon,
+                                            etag: nil,
+                                            endpointTrashbin: true) { account, _, imageIcon, _, _, error in
+            guard error == .success, let imageIcon = imageIcon, account == self.appDelegate.account,
+                let cell = self.collectionView.cellForItem(at: indexPath) else { return }
+            if let cell = cell as? NCTrashListCell {
+                cell.imageItem.image = imageIcon
+            } else if let cell = cell as? NCGridCell {
+                cell.imageItem.image = imageIcon
+            } // else: undefined cell
+        }
     }
 }