From 693d24647b1e47b77a0c99b35e817c3ed10d94be Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Tue, 5 Mar 2024 01:29:39 +0800 Subject: [PATCH] Present error for updating share in file provider UI Signed-off-by: Claudio Cambra --- .../FileProviderUIExt/ShareOptionsView.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareOptionsView.swift b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareOptionsView.swift index 86a1398a1..a0f945e7e 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareOptionsView.swift +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareOptionsView.swift @@ -104,13 +104,16 @@ class ShareOptionsView: NSView { setAllFields(enabled: false) deleteButton.isEnabled = false saveButton.isEnabled = false - _ = await controller?.save( + let error = await controller?.save( password: password, expireDate: expireDate, note: note, label: label, hideDownload: hideDownload ) + if let error = error, error != .success { + dataSource?.uiDelegate?.showError("Error updating share: \(error.errorDescription)") + } await dataSource?.reload() } } -- 2.30.2