From f690bba775b9aea3834ad621ac6b10a2f432ad77 Mon Sep 17 00:00:00 2001 From: Nate Weaver Date: Wed, 27 Nov 2019 15:40:35 -0600 Subject: [PATCH 1/2] Make sure self.postDidLoadFaviconNotification() is always called after a download attempt Otherwise the rest of the favicon URLs won't be tried. --- Shared/Favicons/SingleFaviconDownloader.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Shared/Favicons/SingleFaviconDownloader.swift b/Shared/Favicons/SingleFaviconDownloader.swift index 1772680aa..a7d4fd288 100644 --- a/Shared/Favicons/SingleFaviconDownloader.swift +++ b/Shared/Favicons/SingleFaviconDownloader.swift @@ -85,8 +85,9 @@ private extension SingleFaviconDownloader { if let image = image { self.iconImage = IconImage(image) - self.postDidLoadFaviconNotification() } + + self.postDidLoadFaviconNotification() } } From 64af8840feda2ccbfa8967fc2c14b3717cc0de33 Mon Sep 17 00:00:00 2001 From: Nate Weaver Date: Wed, 27 Nov 2019 15:45:14 -0600 Subject: [PATCH 2/2] Mark appropriate caches as dirty --- Shared/Favicons/FaviconDownloader.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Shared/Favicons/FaviconDownloader.swift b/Shared/Favicons/FaviconDownloader.swift index 83412ea20..068ac580b 100644 --- a/Shared/Favicons/FaviconDownloader.swift +++ b/Shared/Favicons/FaviconDownloader.swift @@ -136,6 +136,7 @@ final class FaviconDownloader { if (!hasIcons) { self.homePageURLsWithNoFaviconURLCache.insert(url) + self.homePageURLsWithNoFaviconURLCacheDirty = true } } @@ -169,6 +170,7 @@ final class FaviconDownloader { if let url = singleFaviconDownloader.homePageURL { if self.homePageToFaviconURLCache[url] == nil { self.homePageToFaviconURLCache[url] = singleFaviconDownloader.faviconURL + self.homePageToFaviconURLCacheDirty = true } }