mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Make SyncDatabase selectPendingCount async.
This commit is contained in:
@@ -402,8 +402,10 @@ final class ReaderAPIAccountDelegate: AccountDelegate {
|
||||
}
|
||||
database.insertStatuses(syncStatuses)
|
||||
|
||||
if database.selectPendingCount() > 100 {
|
||||
sendArticleStatus(for: account) { _ in }
|
||||
database.selectPendingCount { result in
|
||||
if let count = try? result.get(), count > 100 {
|
||||
self.sendArticleStatus(for: account) { _ in }
|
||||
}
|
||||
}
|
||||
|
||||
return account.update(articles, statusKey: statusKey, flag: flag)
|
||||
|
||||
Reference in New Issue
Block a user