Add convenience method to present and log errors in lock view controller
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Tue, 30 Jul 2024 10:48:11 +0000 (18:48 +0800)
committerMatthieu Gallien <matthieu_gallien@yahoo.fr>
Thu, 12 Sep 2024 08:15:58 +0000 (10:15 +0200)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Locking/LockViewController.swift

index 2d7b4735798edbc4dba1c7ace56bb56bb3384627..ae113bee7759efb96ecdf5643ffbb94b3ea56b3f 100644 (file)
@@ -38,4 +38,9 @@ class LockViewController: NSViewController {
     @IBAction func closeAction(_ sender: Any) {
         actionViewController.extensionContext.completeRequest()
     }
+
+    private func presentError(_ error: String) {
+        Logger.lockViewController.error("Error: \(error, privacy: .public)")
+        descriptionLabel.stringValue = "Error: \(error)"
+    }
 }