Fix hang in WidgetDataEncoder by fetching async. Use count queries in places where we were fetching articles just to get counts.

This commit is contained in:
Brent Simmons committed 2026-06-13 14:11:58 -07:00
1 parent f509851ddc
commit eb82dd3ce3
6 files changed
+125 -13

No files matched your search

+1 -1
View File
@@ -413,7 +413,7 @@ private extension AppDelegate {
}
await AccountManager.shared.refreshAll(errorHandler: ErrorHandler.log)
if !AccountManager.shared.isSuspended {
WidgetDataEncoder.shared?.encode()
await WidgetDataEncoder.shared?.encodeAndWait()
self.suspendApplication()
Self.logger.info("Background refresh completed.")
task.setTaskCompleted(success: true)