diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/DocumentActionViewController.swift b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/DocumentActionViewController.swift index d14c3dd3e..dfff3bf34 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/DocumentActionViewController.swift +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/DocumentActionViewController.swift @@ -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 } diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Locking/LockViewController.swift b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Locking/LockViewController.swift index 99eee3080..71f318715 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Locking/LockViewController.swift +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Locking/LockViewController.swift @@ -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") + } }