From: Claudio Cambra Date: Mon, 4 Mar 2024 13:37:04 +0000 (+0800) Subject: Add fields as parameters to save in sharecontroller X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~7^2~46^2~84 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=95ed9b663b8bf42384d24805bc1bcfa3b250b5ea;p=nextcloud-desktop.git Add fields as parameters to save in sharecontroller Signed-off-by: Claudio Cambra --- diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareController.swift b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareController.swift index 4a51d609a..0831d7eb4 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareController.swift +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareController.swift @@ -19,17 +19,29 @@ class ShareController: ObservableObject { self.kit = kit } - func save() async -> NKError? { + func save( + password: String? = nil, + expireDate: String? = nil, + permissions: Int = 1, + publicUpload: Bool = false, + note: String? = nil, + label: String? = nil, + hideDownload: Bool, + attributes: String? = nil, + options: NKRequestOptions = NKRequestOptions() + ) async -> NKError? { return await withCheckedContinuation { continuation in kit.updateShare( idShare: share.idShare, - password: share.password, - expireDate: share.expirationDateString ?? "", - permissions: share.permissions, - note: share.note, - label: share.label, - hideDownload: share.hideDownload, - attributes: share.attributes + password: password, + expireDate: expireDate, + permissions: permissions, + publicUpload: publicUpload, + note: note, + label: label, + hideDownload: hideDownload, + attributes: attributes, + options: options ) { account, share, data, error in Logger.shareController.info("Received update response: \(share?.url ?? "")") defer { continuation.resume(returning: error) }