Convert syncArticleStatusAll to async/await.

This commit is contained in:
Brent Simmons
2024-03-25 23:06:05 -07:00
parent 4a5cb237a0
commit 028df3a8f8
4 changed files with 31 additions and 19 deletions

View File

@@ -187,7 +187,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
if Date() > lastRefresh.addingTimeInterval(15 * 60) {
accountManager.refreshAll(errorHandler: ErrorHandler.log)
} else {
accountManager.syncArticleStatusAll()
Task { @MainActor in
await accountManager.syncArticleStatusAll()
}
}
} else {
accountManager.refreshAll(errorHandler: ErrorHandler.log)
@@ -331,9 +333,8 @@ private extension AppDelegate {
}
Task { @MainActor in
self.accountManager.syncArticleStatusAll() {
completeProcessing()
}
await self.accountManager.syncArticleStatusAll()
completeProcessing()
}
}