Add method to show error in data source ui delegate
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Mon, 4 Mar 2024 17:26:36 +0000 (01:26 +0800)
committerClaudio Cambra <claudio.cambra@nextcloud.com>
Wed, 17 Apr 2024 08:38:56 +0000 (16:38 +0800)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewController.swift
shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareViewDataSourceUIDelegate.swift

index f352fc84e14c3cacc4a84cfe2545f76a1cd45bcb..5b73c4fd8e01fd034dfb5ffdd8d82944ba4c87ed 100644 (file)
@@ -126,4 +126,9 @@ class ShareViewController: NSViewController, ShareViewDataSourceUIDelegate {
         splitView.addArrangedSubview(optionsView)
         optionsView.isHidden = false
     }
+
+    func showError(_ errorString: String) {
+        errorMessageStackView.isHidden = false
+        errorTextLabel.stringValue = errorString
+    }
 }
index 2af2d05a55410f676a3849b35fc3f1089f9659f6..615de16b4f7a3b806278736cce19a46ad32186e8 100644 (file)
@@ -13,4 +13,5 @@ protocol ShareViewDataSourceUIDelegate {
     func fetchFinished()
     func hideOptions()
     func showOptions(share: NKShare)
+    func showError(_ errorString: String)
 }