From 6c66c52a89350eff589b4d72e537576fa363f522 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sat, 5 Sep 2026 09:41:38 -0700 Subject: [PATCH] Return true or false from refreshAll so callers can know if the refreshAll ran. --- Modules/Account/Sources/Account/AccountManager.swift | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Modules/Account/Sources/Account/AccountManager.swift b/Modules/Account/Sources/Account/AccountManager.swift index 5ddb750a0..ffb3d8337 100644 --- a/Modules/Account/Sources/Account/AccountManager.swift +++ b/Modules/Account/Sources/Account/AccountManager.swift @@ -314,10 +314,13 @@ import ActivityLog } } - public func refreshAll(errorHandler: ErrorHandlerCallback? = nil) async { + /// Returns `true` if the refresh ran, `false` if it was skipped + /// due to no network connection. + @discardableResult + public func refreshAll(errorHandler: ErrorHandlerCallback? = nil) async -> Bool { guard NetworkMonitor.shared.isConnected else { Self.logger.info("AccountManager: skipping refreshAll — not connected to internet.") - return + return false } CombinedRefreshProgress.shared.start() @@ -336,6 +339,8 @@ import ActivityLog } } } + + return true } public func sendArticleStatusAll() async {