From 84f9efa4d087339cf3f03d95c28dbedeb708e47a Mon Sep 17 00:00:00 2001 From: Marino Faggiana Date: Wed, 3 Jul 2024 14:11:42 +0200 Subject: [PATCH] https://github.com/nextcloud/ios/issues/2971 Signed-off-by: Marino Faggiana --- iOSClient/Networking/NCNetworking+AsyncAwait.swift | 5 +---- iOSClient/Viewer/NCViewerMedia/NCViewerMedia.swift | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/iOSClient/Networking/NCNetworking+AsyncAwait.swift b/iOSClient/Networking/NCNetworking+AsyncAwait.swift index 866dde8333..3e22cdf5bb 100644 --- a/iOSClient/Networking/NCNetworking+AsyncAwait.swift +++ b/iOSClient/Networking/NCNetworking+AsyncAwait.swift @@ -78,13 +78,10 @@ extension NCNetworking { heightPreview: Int = 512, sizeIcon: Int = 512, etag: String? = nil, - crop: Int = 0, - cropMode: String = "fill", - forceIcon: Int = 1, mimeFallback: Int = 0, options: NKRequestOptions = NKRequestOptions()) async -> (account: String, imagePreview: UIImage?, imageIcon: UIImage?, imageOriginal: UIImage?, etag: String?, error: NKError) { await withUnsafeContinuation({ continuation in - NextcloudKit.shared.downloadPreview(fileId: fileId, fileNamePreviewLocalPath: fileNamePreviewLocalPath, fileNameIconLocalPath: fileNameIconLocalPath, widthPreview: widthPreview, heightPreview: heightPreview, sizeIcon: sizeIcon, etag: etag, crop: crop, cropMode: cropMode, forceIcon: forceIcon, mimeFallback: mimeFallback, options: options) { account, imagePreview, imageIcon, imageOriginal, etag, error in + NextcloudKit.shared.downloadPreview(fileId: fileId, fileNamePreviewLocalPath: fileNamePreviewLocalPath, fileNameIconLocalPath: fileNameIconLocalPath, widthPreview: widthPreview, heightPreview: heightPreview, sizeIcon: sizeIcon, etag: etag, mimeFallback: mimeFallback, options: options) { account, imagePreview, imageIcon, imageOriginal, etag, error in continuation.resume(returning: (account: account, imagePreview: imagePreview, imageIcon: imageIcon, imageOriginal: imageOriginal, etag: etag, error: error)) } }) diff --git a/iOSClient/Viewer/NCViewerMedia/NCViewerMedia.swift b/iOSClient/Viewer/NCViewerMedia/NCViewerMedia.swift index 721fa02d9b..0828e4a214 100644 --- a/iOSClient/Viewer/NCViewerMedia/NCViewerMedia.swift +++ b/iOSClient/Viewer/NCViewerMedia/NCViewerMedia.swift @@ -311,7 +311,6 @@ class NCViewerMedia: UIViewController { heightPreview: Int(sizePreview.height), sizeIcon: NCGlobal.shared.sizeIcon, options: NKRequestOptions(queue: .main)) { _, imagePreview, _, _, etag, error in - if error == .success, let image = imagePreview { NCManageDatabase.shared.setMetadataEtagResource(ocId: self.metadata.ocId, etagResource: etag) return completion(image)