NetNewsWire/Shared/Data/SmallIconProvider.swift

34 lines
579 B
Swift
Raw Normal View History

//
// SmallIconProvider.swift
2018-08-29 07:18:24 +02:00
// NetNewsWire
//
// Created by Brent Simmons on 12/16/17.
// Copyright © 2017 Ranchero Software. All rights reserved.
//
import AppKit
import Articles
import Account
protocol SmallIconProvider {
var smallIcon: NSImage? { get }
}
extension Feed: SmallIconProvider {
var smallIcon: NSImage? {
if let image = appDelegate.faviconDownloader.favicon(for: self) {
return image
}
return AppImages.genericFeedImage
}
}
extension Folder: SmallIconProvider {
var smallIcon: NSImage? {
2018-12-09 21:32:33 +01:00
return NSImage(named: NSImage.folderName)
}
}