diff --git a/Shared/Images/FeedIconDownloader.swift b/Shared/Images/FeedIconDownloader.swift index 4b12c8721..7fb4c042b 100644 --- a/Shared/Images/FeedIconDownloader.swift +++ b/Shared/Images/FeedIconDownloader.swift @@ -40,6 +40,10 @@ public final class FeedIconDownloader { } } + private var homePagesWithUglyIcons: Set = { + return Set(["https://www.macsparky.com/"]) + }() + private var urlsInProgress = Set() private var cache = [Feed: IconImage]() private var waitingForFeedURLs = [String: Feed]() @@ -120,7 +124,7 @@ private extension FeedIconDownloader { func icon(forHomePageURL homePageURL: String, feed: Feed, _ imageResultBlock: @escaping (RSImage?) -> Void) { - if homePagesWithNoIconURLCache.contains(homePageURL) { + if homePagesWithNoIconURLCache.contains(homePageURL) || homePagesWithUglyIcons.contains(homePageURL) { imageResultBlock(nil) return } diff --git a/iOS/AppDelegate.swift b/iOS/AppDelegate.swift index 839ccf3de..f75dc0880 100644 --- a/iOS/AppDelegate.swift +++ b/iOS/AppDelegate.swift @@ -182,7 +182,7 @@ private extension AppDelegate { let homePageURLsWithNoFaviconURL = tempDir.appendingPathComponent("HomePageURLsWithNoFaviconURLCache.plist") // If the image disk cache hasn't been flushed for 3 days and the network is available, delete it -// if let flushDate = AppDefaults.lastImageCacheFlushDate, flushDate.addingTimeInterval(3600*24*3) < Date() { + if let flushDate = AppDefaults.lastImageCacheFlushDate, flushDate.addingTimeInterval(3600*24*3) < Date() { if let reachability = try? Reachability(hostname: "apple.com") { if reachability.connection != .unavailable { for tempItem in [faviconsFolderURL, imagesFolderURL, homePageToIconURL, homePagesWithNoIconURL, homePageToFaviconURL, homePageURLsWithNoFaviconURL] { @@ -196,7 +196,7 @@ private extension AppDelegate { AppDefaults.lastImageCacheFlushDate = Date() } } -// } + } try! FileManager.default.createDirectory(at: faviconsFolderURL, withIntermediateDirectories: true, attributes: nil) let faviconsFolder = faviconsFolderURL.absoluteString