Add basic properties to lock view controller

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2024-07-30 17:15:43 +08:00 committed by Matthieu Gallien
parent ec66bcd19b
commit e3b6cd9935
2 changed files with 13 additions and 2 deletions

View file

@ -40,9 +40,9 @@ class DocumentActionViewController: FPUIActionExtensionViewController {
case "com.nextcloud.desktopclient.FileProviderUIExt.ShareAction":
prepare(childViewController: ShareViewController(itemIdentifiers))
case "com.nextcloud.desktopclient.FileProviderUIExt.LockFileAction":
prepare(childViewController: LockViewController(itemIdentifiers))
prepare(childViewController: LockViewController(itemIdentifiers, locking: true))
case "com.nextcloud.desktopclient.FileProviderUIExt.UnlockFileAction":
prepare(childViewController: LockViewController(itemIdentifiers))
prepare(childViewController: LockViewController(itemIdentifiers, locking: false))
default:
return
}

View file

@ -12,5 +12,16 @@ import OSLog
import QuickLookThumbnailing
class LockViewController: NSViewController {
let itemIdentifiers: [NSFileProviderItemIdentifier]
let locking: Bool
init(_ itemIdentifiers: [NSFileProviderItemIdentifier], locking: Bool) {
self.itemIdentifiers = itemIdentifiers
self.locking = locking
super.init(nibName: nil, bundle: nil)
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}