mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Added initial POC version of NetNewsWire for iOS to use as a starting point for the actual app.
This commit is contained in:
@@ -6,28 +6,37 @@
|
||||
// Copyright © 2017 Ranchero Software. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
import Foundation
|
||||
import Articles
|
||||
import Account
|
||||
import RSCore
|
||||
|
||||
protocol SmallIconProvider {
|
||||
|
||||
var smallIcon: NSImage? { get }
|
||||
var smallIcon: RSImage? { get }
|
||||
}
|
||||
|
||||
extension Feed: SmallIconProvider {
|
||||
|
||||
var smallIcon: NSImage? {
|
||||
var smallIcon: RSImage? {
|
||||
if let image = appDelegate.faviconDownloader.favicon(for: self) {
|
||||
return image
|
||||
}
|
||||
#if os(macOS)
|
||||
return AppImages.genericFeedImage
|
||||
#else
|
||||
return AppAssets.feedImage
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
extension Folder: SmallIconProvider {
|
||||
|
||||
var smallIcon: NSImage? {
|
||||
return NSImage(named: NSImage.folderName)
|
||||
var smallIcon: RSImage? {
|
||||
#if os(macOS)
|
||||
return RSImage(named: NSImage.folderName)
|
||||
#else
|
||||
return AppAssets.masterFolderImage
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user