Use a standard folder icon the Feed Directory sidebar.

This commit is contained in:
Brent Simmons 2017-12-27 18:01:05 -08:00
parent bab4b285d2
commit e875473a1c

View File

@ -102,16 +102,19 @@ extension FeedListViewController: NSOutlineViewDelegate {
cell.objectValue = node
cell.name = nameFor(node)
cell.image = imageFor(node)
cell.shouldShowImage = node.representedObject is FeedListFeed
cell.shouldShowImage = true
}
func imageFor(_ node: Node) -> NSImage? {
guard let feed = node.representedObject as? FeedListFeed else {
return nil
if let _ = node.representedObject as? FeedListFolder {
return NSImage(named: NSImage.Name.folder)
}
else if let feed = node.representedObject as? FeedListFeed {
return appDelegate.faviconDownloader.favicon(withHomePageURL: feed.homePageURL)
}
return nil
}
func nameFor(_ node: Node) -> String {