mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-21 20:45:51 +03:00
Set basic property of sharetableitemview in delegate method of data source
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
c2ec72c132
commit
ee21715860
1 changed files with 8 additions and 2 deletions
|
@ -138,8 +138,14 @@ class ShareTableViewDataSource: NSObject, NSTableViewDataSource, NSTableViewDele
|
|||
@objc func tableView(
|
||||
_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int
|
||||
) -> NSView? {
|
||||
//let share = shares[row]
|
||||
let view = tableView.makeView(withIdentifier: shareItemViewIdentifier, owner: self)
|
||||
let share = shares[row]
|
||||
guard let view = tableView.makeView(
|
||||
withIdentifier: shareItemViewIdentifier, owner: self
|
||||
) as? ShareTableItemView else {
|
||||
Logger.sharesDataSource.error("Acquired item view from table is not a Share item view!")
|
||||
return nil
|
||||
}
|
||||
view.label.stringValue = share.label
|
||||
return view
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue