Try downloading thumbnails again when networking comes back.

This commit is contained in:
Brent Simmons committed 2026-10-28 11:49:34 -07:00
1 parent c6cf4e704c
commit 01369a21d3
1 file changed
+9
@@ -755,6 +755,7 @@ private extension MainTimelineViewController {
NotificationCenter.default.addObserver(self, selector: #selector(handleArticleThumbnailURLsDidBecomeAvailable(_:)), name: .articleThumbnailURLsDidBecomeAvailable, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(handleArticleThumbnailDidBecomeAvailable(_:)), name: .articleThumbnailDidBecomeAvailable, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(handleArticleThumbnailDownloadDidFail(_:)), name: .articleThumbnailDownloadDidFail, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(handleNetworkStatusDidChange(_:)), name: .networkStatusDidChange, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(contentSizeCategoryDidChange), name: UIContentSizeCategory.didChangeNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(displayNameDidChange), name: .DisplayNameDidChange, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(willEnterForeground(_:)), name: UIApplication.willEnterForegroundNotification, object: nil)
@@ -1295,6 +1296,14 @@ private extension MainTimelineViewController {
}
}
@objc func handleNetworkStatusDidChange(_ notification: Notification) {
guard thumbnailMode != nil, ArticleThumbnailFinder.shared.networkAllowsDownloads else {
return
}
// Thumbnails that couldn’t download while offline or in Low Data Mode try again.
reloadVisibleCells()
}
@objc func contentSizeCategoryDidChange(_ note: Notification) {
Self.logger.debug("MainTimelineViewController: contentSizeCategoryDidChange")
reloadVisibleCells()