зеркало из https://github.com/nextcloud/desktop.git
Store file provider item identifiers in ShareViewController
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Родитель
ce026dfd94
Коммит
7a9ca59734
|
@ -27,7 +27,7 @@ class DocumentActionViewController: FPUIActionExtensionViewController {
|
|||
Logger.actionViewController.info("Preparing for action: \(actionIdentifier)")
|
||||
|
||||
if actionIdentifier == "com.nextcloud.desktopclient.FileProviderUIExt.ShareAction" {
|
||||
prepare(childViewController: ShareViewController())
|
||||
prepare(childViewController: ShareViewController(itemIdentifiers))
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -6,8 +6,11 @@
|
|||
//
|
||||
|
||||
import AppKit
|
||||
import FileProvider
|
||||
|
||||
class ShareViewController: NSViewController {
|
||||
let itemIdentifiers: [NSFileProviderItemIdentifier]
|
||||
|
||||
@IBOutlet weak var fileNameIcon: NSImageView!
|
||||
@IBOutlet weak var fileNameLabel: NSTextField!
|
||||
@IBOutlet weak var descriptionLabel: NSTextField!
|
||||
|
@ -20,4 +23,13 @@ class ShareViewController: NSViewController {
|
|||
var actionViewController: DocumentActionViewController! {
|
||||
return parent as? DocumentActionViewController
|
||||
}
|
||||
|
||||
init(_ itemIdentifiers: [NSFileProviderItemIdentifier]) {
|
||||
self.itemIdentifiers = itemIdentifiers
|
||||
super.init(nibName: nil, bundle: nil)
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче