Load icons at start of background refresh, so widgets and notifications are more likely to get their proper icons.

This commit is contained in:
Brent Simmons committed 2026-11-03 09:53:28 -08:00
1 parent 9b35e47f68
commit 16e54269d7
1 file changed
+4
+4
View File
@@ -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()