Change to use Favicon generator.
This commit is contained in:
parent
0d2583948a
commit
c366a55cb5
|
@ -16,12 +16,6 @@ extension NSImage.Name {
|
|||
|
||||
struct AppAssets {
|
||||
|
||||
static var genericFeedImage: IconImage? = {
|
||||
let path = "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/BookmarkIcon.icns"
|
||||
let image = RSImage(contentsOfFile: path)
|
||||
return image != nil ? IconImage(image!) : nil
|
||||
}()
|
||||
|
||||
static var timelineStar: RSImage! = {
|
||||
return RSImage(named: .timelineStar)
|
||||
}()
|
||||
|
|
|
@ -119,7 +119,7 @@ private extension FeedInspectorViewController {
|
|||
return
|
||||
}
|
||||
|
||||
imageView?.image = AppAssets.genericFeedImage?.image
|
||||
imageView?.image = feed.smallIcon?.image
|
||||
}
|
||||
|
||||
func updateName() {
|
||||
|
|
|
@ -41,7 +41,7 @@ import RSCore
|
|||
return nil
|
||||
}
|
||||
|
||||
let image = sendToCommand.image ?? AppAssets.genericFeedImage?.image ?? NSImage()
|
||||
let image = sendToCommand.image ?? NSImage()
|
||||
return NSSharingService(title: sendToCommand.title, image: image, alternateImage: nil) {
|
||||
sendToCommand.sendObject(object, selectedText: nil)
|
||||
}
|
||||
|
|
|
@ -81,8 +81,7 @@ class SidebarCell : NSTableCellView {
|
|||
}()
|
||||
|
||||
private let faviconImageView: NSImageView = {
|
||||
let iconImage = AppAssets.genericFeedImage
|
||||
let imageView = iconImage != nil ? NSImageView(image: iconImage!.image) : NSImageView(frame: NSRect.zero)
|
||||
let imageView = NSImageView(frame: NSRect.zero)
|
||||
imageView.animates = false
|
||||
imageView.imageAlignment = .alignCenter
|
||||
imageView.imageScaling = .scaleProportionallyDown
|
||||
|
|
|
@ -22,11 +22,7 @@ extension Feed: SmallIconProvider {
|
|||
if let iconImage = appDelegate.faviconDownloader.favicon(for: self) {
|
||||
return iconImage
|
||||
}
|
||||
#if os(macOS)
|
||||
return AppAssets.genericFeedImage
|
||||
#else
|
||||
return FaviconGenerator.favicon(self)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue