Register shareItemView nib in shareTableView

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2024-02-27 23:56:18 +08:00
parent 8add57a048
commit 331a76195b

View file

@ -12,8 +12,11 @@ import OSLog
class ShareTableViewDataSource: NSObject, NSTableViewDataSource, NSTableViewDelegate { class ShareTableViewDataSource: NSObject, NSTableViewDataSource, NSTableViewDelegate {
private let shareItemViewIdentifier = NSUserInterfaceItemIdentifier("ShareTableItemView") private let shareItemViewIdentifier = NSUserInterfaceItemIdentifier("ShareTableItemView")
private let shareItemViewNib = NSNib(nibNamed: "ShareTableItemView", bundle: nil)
var sharesTableView: NSTableView? { var sharesTableView: NSTableView? {
didSet { didSet {
sharesTableView?.register(shareItemViewNib, forIdentifier: shareItemViewIdentifier)
sharesTableView?.dataSource = self sharesTableView?.dataSource = self
sharesTableView?.reloadData() sharesTableView?.reloadData()
} }