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
|
||||
}
|
||||
|
||||
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() {
|
||||
guard let homePageURL = feed.homePageURL else {
|
||||
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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue