mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-28 16:26:04 +00:00
Load icons at start of background refresh, so widgets and notifications are more likely to get their proper icons.
This commit is contained in:
1 parent
9b35e47f68
commit
16e54269d7
1 file changed
+4
@@ -459,6 +459,10 @@ private extension AppDelegate {
|
||||
if AccountManager.shared.isSuspended {
|
||||
AccountManager.shared.resumeAll()
|
||||
}
|
||||
// After a launch in the background nothing has asked for icons yet, so widgets and
|
||||
// new-article notifications would get generated placeholders. Their files load during the refresh.
|
||||
let feeds = AccountManager.shared.activeAccounts.flatMap { $0.flattenedFeeds() }
|
||||
IconImageCache.shared.prefetchImagesForFeeds(feeds)
|
||||
let didRefresh = await AccountManager.shared.refreshAll(errorHandler: ErrorHandler.log)
|
||||
if !Task.isCancelled {
|
||||
await WidgetDataEncoder.shared?.encodeAndWait()
|
||||
|
||||
Reference in new issue
Block a user