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)