mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-05 03:37:41 +00:00
Return true or false from refreshAll so callers can know if the refreshAll ran.
This commit is contained in:
1 parent
8b4221eb0a
commit
6c66c52a89
1 file changed
+7
-2
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user