Handle new locking action identifiers in document action view controller of FileProviderUIExt

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2024-07-30 16:20:10 +08:00 committed by Matthieu Gallien
parent 501c1c4d62
commit ec66bcd19b

View file

@ -36,17 +36,21 @@ class DocumentActionViewController: FPUIActionExtensionViewController {
) { ) {
Logger.actionViewController.info("Preparing action: \(actionIdentifier, privacy: .public)") 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)) 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) { override func prepare(forError error: Error) {
Logger.actionViewController.info( Logger.actionViewController.info(
""" "Preparing for error: \(error.localizedDescription, privacy: .public)"
Preparing for error: \(error.localizedDescription, privacy: .public)
"""
) )
} }