Look for images in HTML when provided thumbnail fails or is too small.

This commit is contained in:
Brent Simmons committed 2026-10-28 11:22:00 -07:00
1 parent 14f570bbf1
commit 3cff328792
2 files changed
+20

No files matched your search

@@ -1281,7 +1281,18 @@ private extension MainTimelineViewController {
}
// Articles that used the failed URL now get their next source, or none.
let articleIDs = Set(thumbnailURLCache.filter { $0.value == url }.keys)
guard !articleIDs.isEmpty else {
return
}
thumbnailURLsDidChange(for: articleIDs)
// A failed provided image falls back to images in the HTML.
guard let articlesUsingURL = articles?.filter({ articleIDs.contains($0.articleID) }) else {
return
}
Task {
await ArticleThumbnailFinder.shared.discoverThumbnailURLs(for: articlesUsingURL)
}
}
@objc func contentSizeCategoryDidChange(_ note: Notification) {