mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-24 22:15:57 +03:00
Instantiate share data source in share view controller
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
1288448336
commit
46ad6f0bfb
1 changed files with 3 additions and 0 deletions
|
@ -11,6 +11,7 @@ import OSLog
|
||||||
import QuickLookThumbnailing
|
import QuickLookThumbnailing
|
||||||
|
|
||||||
class ShareViewController: NSViewController {
|
class ShareViewController: NSViewController {
|
||||||
|
let shareDataSource = ShareTableViewDataSource()
|
||||||
let itemIdentifiers: [NSFileProviderItemIdentifier]
|
let itemIdentifiers: [NSFileProviderItemIdentifier]
|
||||||
|
|
||||||
@IBOutlet weak var fileNameIcon: NSImageView!
|
@IBOutlet weak var fileNameIcon: NSImageView!
|
||||||
|
@ -58,6 +59,8 @@ class ShareViewController: NSViewController {
|
||||||
do {
|
do {
|
||||||
let itemUrl = try await manager.getUserVisibleURL(for: itemIdentifier)
|
let itemUrl = try await manager.getUserVisibleURL(for: itemIdentifier)
|
||||||
await updateDisplay(itemUrl: itemUrl)
|
await updateDisplay(itemUrl: itemUrl)
|
||||||
|
shareDataSource.sharesTableView = tableView
|
||||||
|
shareDataSource.loadItem(identifier: itemIdentifier, url: itemUrl)
|
||||||
} catch let error {
|
} catch let error {
|
||||||
let errorString = "Error processing item: \(error)"
|
let errorString = "Error processing item: \(error)"
|
||||||
Logger.shareViewController.error("\(errorString)")
|
Logger.shareViewController.error("\(errorString)")
|
||||||
|
|
Loading…
Reference in a new issue