diff --git a/AppVersion.xcconfig b/AppVersion.xcconfig index e08d0b0a56..580a049436 100644 --- a/AppVersion.xcconfig +++ b/AppVersion.xcconfig @@ -1 +1 @@ -MARKETING_VERSION = 2024.8 +MARKETING_VERSION = 2024.9 diff --git a/MastodonSDK/Package.swift b/MastodonSDK/Package.swift index 9f743eff22..562afba937 100644 --- a/MastodonSDK/Package.swift +++ b/MastodonSDK/Package.swift @@ -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"), diff --git a/MastodonSDK/Sources/MastodonUI/View/Content/NewsView+Configuration.swift b/MastodonSDK/Sources/MastodonUI/View/Content/NewsView+Configuration.swift index 8403be7569..96fc08511e 100644 --- a/MastodonSDK/Sources/MastodonUI/View/Content/NewsView+Configuration.swift +++ b/MastodonSDK/Sources/MastodonUI/View/Content/NewsView+Configuration.swift @@ -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 } } }