Use a feed icon included with the app (instead of the app icon) as the icon for NetNewsWire feeds.

This commit is contained in:
Brent Simmons
2024-12-15 20:20:11 -08:00
parent 1f8d3d2522
commit 2298a43d5b
8 changed files with 29 additions and 2 deletions

View File

@@ -48,6 +48,8 @@ struct AppAssets {
return RSImage(named: "accountTheOldReader")
}()
static let nnwFeedIcon = RSImage(named: "feedIcon")!
@available(macOS 11.0, *)
static var addNewSidebarItemImage: RSImage = {
return NSImage(systemSymbolName: "plus", accessibilityDescription: nil)!

View File

@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "FeedIcon 2.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "FeedIcon.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "FeedIcon 1.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

View File

@@ -33,4 +33,6 @@ extension IconImage {
}
return nil
}()
static let nnwFeedIcon = IconImage(AppAssets.nnwFeedIcon)
}

View File

@@ -123,7 +123,7 @@ final class FaviconDownloader {
if let url = URL(string: homePageURL) {
if url.host == "nnw.ranchero.com" || url.host == "netnewswire.blog" {
return IconImage.appIcon
return IconImage.nnwFeedIcon
}
}

View File

@@ -52,7 +52,7 @@ public final class FeedIconDownloader {
}
if let homePageURLString = feed.homePageURL, let homePageURL = URL(string: homePageURLString), (homePageURL.host == "nnw.ranchero.com" || homePageURL.host == "netnewswire.blog") {
return IconImage.appIcon
return IconImage.nnwFeedIcon
}
func checkHomePageURL() {