Skip to content

Commit

Permalink
Fix Kingfisher deprecation warnings (#2799)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/414235014887631/1207185436384594/f
Tech Design URL:
CC:

Description:

This PR fixes Kingfisher deprecation warnings.

These appear on every PR, like this one, where you can see a list of warnings at the bottom of the diff.
  • Loading branch information
samsymons committed Apr 30, 2024
1 parent ae60548 commit 5e52e8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Core/FaviconsHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
2 changes: 1 addition & 1 deletion DuckDuckGo/Favicons.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 5e52e8d

Please sign in to comment.