mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-21 12:35:52 +03:00
Add basic properties to lock view controller
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
ec66bcd19b
commit
e3b6cd9935
2 changed files with 13 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue