Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Ref #4329: Favorite Widgets crash.
Browse files Browse the repository at this point in the history
  • Loading branch information
iccub committed Nov 12, 2021
1 parent 6bdda38 commit fc50510
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ extension BrowserViewController: NSFetchedResultsControllerDelegate {
for (index, fav) in favs.prefix(16).enumerated() {
if let url = fav.url?.asURL {
group.enter()
let fetcher = FaviconFetcher(siteURL: url, kind: .largeIcon)
let fetcher = FaviconFetcher(siteURL: url, kind: .largeIcon, persistentCheckOverride: true)
widgetFaviconFetchers.append(fetcher)
fetcher.load { _, attributes in
favData[index] = .init(url: url, favicon: attributes)
Expand Down
4 changes: 2 additions & 2 deletions Client/Frontend/Browser/Favicons/FaviconFetcher.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ class FaviconFetcher {

static let defaultFaviconImage = #imageLiteral(resourceName: "defaultFavicon")

init(siteURL: URL, kind: Kind, domain: Domain? = nil) {
init(siteURL: URL, kind: Kind, domain: Domain? = nil, persistentCheckOverride: Bool? = nil) {
self.url = siteURL
self.kind = kind
self.domain = domain ?? Domain.getOrCreate(
forUrl: siteURL,
persistent: !PrivateBrowsingManager.shared.isPrivateBrowsing
persistent: persistentCheckOverride ?? !PrivateBrowsingManager.shared.isPrivateBrowsing
)
}

Expand Down

0 comments on commit fc50510

Please sign in to comment.