From 2454b807bb496d60c091b11605c1e5e2e98ae547 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Tue, 21 Apr 2020 20:23:46 -0500 Subject: [PATCH] Always update the status sync timer when returning to the foreground. Issue #2005 --- iOS/AppDelegate.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iOS/AppDelegate.swift b/iOS/AppDelegate.swift index e6f25a9ce..0dd99bad3 100644 --- a/iOS/AppDelegate.swift +++ b/iOS/AppDelegate.swift @@ -157,13 +157,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD func prepareAccountsForForeground() { extensionFeedAddRequestFile.resume() - + syncTimer?.update() + if let lastRefresh = AppDefaults.lastRefresh { if Date() > lastRefresh.addingTimeInterval(15 * 60) { AccountManager.shared.refreshAll(errorHandler: ErrorHandler.log) } else { AccountManager.shared.syncArticleStatusAll() - syncTimer?.update() } } else { AccountManager.shared.refreshAll(errorHandler: ErrorHandler.log)