Bump FaviconFinder to 4.5.0 (IOS-289) (#1343)
Upgrades dependency to fix crash related to it.
This commit is contained in:
commit
69187b9540
@ -1 +1 @@
|
||||
MARKETING_VERSION = 2024.8
|
||||
MARKETING_VERSION = 2024.9
|
||||
|
@ -35,7 +35,7 @@ let package = Package(
|
||||
],
|
||||
dependencies: [
|
||||
.package(name: "ArkanaKeys", path: "../dependencies/ArkanaKeys"),
|
||||
.package(url: "https://github.com/will-lumley/FaviconFinder.git", from: "3.2.2"),
|
||||
.package(url: "https://github.com/will-lumley/FaviconFinder.git", from: "4.5.0"),
|
||||
.package(url: "https://github.com/MainasuK/UITextView-Placeholder.git", from: "1.4.1"),
|
||||
.package(url: "https://github.com/Alamofire/Alamofire.git", from: "5.4.0"),
|
||||
.package(url: "https://github.com/Alamofire/AlamofireImage.git", from: "4.1.0"),
|
||||
|
@ -18,17 +18,13 @@ extension NewsView {
|
||||
providerFaviconImageView.image = faviconPlaceholder
|
||||
if let url = URL(string: link.url) {
|
||||
let token = providerFaviconImageView.tag
|
||||
FaviconFinder(url: url).downloadFavicon { [weak self] result in
|
||||
guard let self = self else { return }
|
||||
switch result {
|
||||
case .success(let favicon):
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
guard let self = self else { return }
|
||||
guard self.providerFaviconImageView.tag == token else { return }
|
||||
self.providerFaviconImageView.image = favicon.image
|
||||
}
|
||||
case .failure:
|
||||
break
|
||||
Task {
|
||||
do {
|
||||
let favicon = try await FaviconFinder(url: url).downloadFavicon()
|
||||
guard self.providerFaviconImageView.tag == token else { return }
|
||||
self.providerFaviconImageView.image = favicon.image
|
||||
} catch {
|
||||
// no-op
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user