From 24ce9a1e1e4bb7a1273df2fca21ac685240c3374 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Tue, 5 Mar 2024 01:26:36 +0800 Subject: [PATCH] Add method to show error in data source ui delegate Signed-off-by: Claudio Cambra --- .../FileProviderUIExt/ShareViewController.swift | 5 +++++ .../FileProviderUIExt/ShareViewDataSourceUIDelegate.swift | 1 + 2 files changed, 6 insertions(+) diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewController.swift b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewController.swift index f352fc84e..5b73c4fd8 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewController.swift +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewController.swift @@ -126,4 +126,9 @@ class ShareViewController: NSViewController, ShareViewDataSourceUIDelegate { splitView.addArrangedSubview(optionsView) optionsView.isHidden = false } + + func showError(_ errorString: String) { + errorMessageStackView.isHidden = false + errorTextLabel.stringValue = errorString + } } diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewDataSourceUIDelegate.swift b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewDataSourceUIDelegate.swift index 2af2d05a5..615de16b4 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewDataSourceUIDelegate.swift +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewDataSourceUIDelegate.swift @@ -13,4 +13,5 @@ protocol ShareViewDataSourceUIDelegate { func fetchFinished() func hideOptions() func showOptions(share: NKShare) + func showError(_ errorString: String) }