From 178157a7896bf976076a89a3e9a7fbc751edfa5b Mon Sep 17 00:00:00 2001 From: amddg44 Date: Mon, 11 Sep 2023 16:05:33 +0200 Subject: [PATCH] Optimizing the logins list screen (#1982) Task/Issue URL: https://app.asana.com/0/1201493110486074/1205258271017091/f Tech Design URL: CC: Description: Removes unused legacy favicon code that was impacting screen loading times --- DuckDuckGo/AutofillLoginListItemViewModel.swift | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/DuckDuckGo/AutofillLoginListItemViewModel.swift b/DuckDuckGo/AutofillLoginListItemViewModel.swift index 098a6176b4..8bbc5c3f6f 100644 --- a/DuckDuckGo/AutofillLoginListItemViewModel.swift +++ b/DuckDuckGo/AutofillLoginListItemViewModel.swift @@ -23,7 +23,6 @@ import UIKit import Common final class AutofillLoginListItemViewModel: Identifiable, Hashable { - @Published var image = UIImage(systemName: "globe")! var preferredFaviconLetters: String { let accountName = self.account.name(tld: tld, autofillDomainNameUrlMatcher: urlMatcher) @@ -47,20 +46,6 @@ final class AutofillLoginListItemViewModel: Identifiable, Hashable { self.title = account.name(tld: tld, autofillDomainNameUrlMatcher: autofillDomainNameUrlMatcher) self.subtitle = account.username ?? "" self.urlMatcher = autofillDomainNameUrlMatcher - fetchImage() - } - - private func fetchImage() { - FaviconsHelper.loadFaviconSync(forDomain: account.domain, - usingCache: .fireproof, - useFakeFavicon: true, - preferredFakeFaviconLetters: preferredFaviconLetters) { image, _ in - if let image = image { - self.image = image - } else { - self.image = UIImage(systemName: "globe")! - } - } } static func == (lhs: AutofillLoginListItemViewModel, rhs: AutofillLoginListItemViewModel) -> Bool {