mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-26 09:33:25 +01:00
Use a standard folder icon the Feed Directory sidebar.
This commit is contained in:
parent
bab4b285d2
commit
e875473a1c
@ -102,15 +102,18 @@ extension FeedListViewController: NSOutlineViewDelegate {
|
|||||||
cell.objectValue = node
|
cell.objectValue = node
|
||||||
cell.name = nameFor(node)
|
cell.name = nameFor(node)
|
||||||
cell.image = imageFor(node)
|
cell.image = imageFor(node)
|
||||||
cell.shouldShowImage = node.representedObject is FeedListFeed
|
cell.shouldShowImage = true
|
||||||
}
|
}
|
||||||
|
|
||||||
func imageFor(_ node: Node) -> NSImage? {
|
func imageFor(_ node: Node) -> NSImage? {
|
||||||
|
|
||||||
guard let feed = node.representedObject as? FeedListFeed else {
|
if let _ = node.representedObject as? FeedListFolder {
|
||||||
return nil
|
return NSImage(named: NSImage.Name.folder)
|
||||||
}
|
}
|
||||||
return appDelegate.faviconDownloader.favicon(withHomePageURL: feed.homePageURL)
|
else if let feed = node.representedObject as? FeedListFeed {
|
||||||
|
return appDelegate.faviconDownloader.favicon(withHomePageURL: feed.homePageURL)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func nameFor(_ node: Node) -> String {
|
func nameFor(_ node: Node) -> String {
|
||||||
|
Loading…
Reference in New Issue
Block a user