mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-02-02 20:16:54 +01:00
Fix logic in FeedIconDownloader so that we check the home page metadata. (I had broken this recently.)
This commit is contained in:
parent
3d253ce6d9
commit
1ee0ab5a73
@ -37,18 +37,6 @@ public final class FeedIconDownloader {
|
|||||||
return cachedImage
|
return cachedImage
|
||||||
}
|
}
|
||||||
|
|
||||||
if let iconURL = feed.iconURL {
|
|
||||||
icon(forURL: iconURL) { (image) in
|
|
||||||
if let image = image {
|
|
||||||
self.postFeedIconDidBecomeAvailableNotification(feed)
|
|
||||||
self.cache[feed] = image
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
checkHomePageURL()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func checkHomePageURL() {
|
func checkHomePageURL() {
|
||||||
guard let homePageURL = feed.homePageURL else {
|
guard let homePageURL = feed.homePageURL else {
|
||||||
return
|
return
|
||||||
@ -61,6 +49,22 @@ public final class FeedIconDownloader {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if let iconURL = feed.iconURL {
|
||||||
|
icon(forURL: iconURL) { (image) in
|
||||||
|
if let image = image {
|
||||||
|
self.postFeedIconDidBecomeAvailableNotification(feed)
|
||||||
|
self.cache[feed] = image
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
checkHomePageURL()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
checkHomePageURL()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user