mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-29 00:31:14 +00:00
Make sure completion handler is called when there are no active accounts. Issue #1727
This commit is contained in:
1 parent
c6beb3c9dd
commit
b53cbfcf2c
1 file changed
+5
@@ -272,6 +272,11 @@ public final class AccountManager: UnreadCountProvider {
|
||||
var allFetchedArticles = Set<Article>()
|
||||
let numberOfAccounts = activeAccounts.count
|
||||
var accountsReporting = 0
|
||||
|
||||
guard numberOfAccounts > 0 else {
|
||||
completion(.success(allFetchedArticles))
|
||||
return
|
||||
}
|
||||
|
||||
for account in activeAccounts {
|
||||
account.fetchArticlesAsync(fetchType) { (articleSetResult) in
|
||||
|
||||
Reference in new issue
Block a user