mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-29 08:42:51 +00:00
Try downloading thumbnails again when networking comes back.
This commit is contained in:
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()
|
||||
|
||||
Reference in new issue
Block a user