diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/DocumentActionViewController.swift b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/DocumentActionViewController.swift index 96363e962..d14c3dd3e 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/DocumentActionViewController.swift +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/DocumentActionViewController.swift @@ -36,17 +36,21 @@ class DocumentActionViewController: FPUIActionExtensionViewController { ) { Logger.actionViewController.info("Preparing action: \(actionIdentifier, privacy: .public)") - if actionIdentifier == "com.nextcloud.desktopclient.FileProviderUIExt.ShareAction" { + switch (actionIdentifier) { + case "com.nextcloud.desktopclient.FileProviderUIExt.ShareAction": prepare(childViewController: ShareViewController(itemIdentifiers)) + case "com.nextcloud.desktopclient.FileProviderUIExt.LockFileAction": + prepare(childViewController: LockViewController(itemIdentifiers)) + case "com.nextcloud.desktopclient.FileProviderUIExt.UnlockFileAction": + prepare(childViewController: LockViewController(itemIdentifiers)) + default: + return } - } override func prepare(forError error: Error) { Logger.actionViewController.info( - """ - Preparing for error: \(error.localizedDescription, privacy: .public) - """ + "Preparing for error: \(error.localizedDescription, privacy: .public)" ) }