From 86c6e053919743347188c35139f3cf7b7046fe8b Mon Sep 17 00:00:00 2001 From: Sam Symons Date: Sat, 27 Apr 2024 11:43:49 -0700 Subject: [PATCH] Fix Kingfisher deprecation warnings. --- Core/FaviconsHelper.swift | 4 ++-- DuckDuckGo/Favicons.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/FaviconsHelper.swift b/Core/FaviconsHelper.swift index b566eb8c01..478da57e54 100644 --- a/Core/FaviconsHelper.swift +++ b/Core/FaviconsHelper.swift @@ -24,11 +24,11 @@ struct FaviconsHelper { // this function is now static and outside of Favicons, otherwise there is a circular dependency between // Favicons and NotFoundCachingDownloader - public static func defaultResource(forDomain domain: String?, sourcesProvider: FaviconSourcesProvider) -> Kingfisher.ImageResource? { + public static func defaultResource(forDomain domain: String?, sourcesProvider: FaviconSourcesProvider) -> KF.ImageResource? { guard let domain = domain, let source = sourcesProvider.mainSource(forDomain: domain) else { return nil } let key = Favicons.createHash(ofDomain: domain) - return ImageResource(downloadURL: source, cacheKey: key) + return KF.ImageResource(downloadURL: source, cacheKey: key) } } diff --git a/DuckDuckGo/Favicons.swift b/DuckDuckGo/Favicons.swift index bf8baa03e1..8ecdc75bb0 100644 --- a/DuckDuckGo/Favicons.swift +++ b/DuckDuckGo/Favicons.swift @@ -441,7 +441,7 @@ public class Favicons { return image } - public func defaultResource(forDomain domain: String?) -> Kingfisher.ImageResource? { + public func defaultResource(forDomain domain: String?) -> KF.ImageResource? { return FaviconsHelper.defaultResource(forDomain: domain, sourcesProvider: sourcesProvider) }