Remove synchronous sync database status insert function.

This commit is contained in:
Maurice Parker
2020-10-25 12:32:12 -05:00
parent 45f5776b7e
commit cba900d4e4
9 changed files with 35 additions and 55 deletions

View File

@@ -472,11 +472,11 @@ final class ReaderAPIAccountDelegate: AccountDelegate {
return SyncStatus(articleID: article.articleID, key: SyncStatus.Key(statusKey), flag: flag)
}
try? self.database.insertStatuses(syncStatuses)
self.database.selectPendingCount { result in
if let count = try? result.get(), count > 100 {
self.sendArticleStatus(for: account) { _ in }
self.database.insertStatuses(syncStatuses) { _ in
self.database.selectPendingCount { result in
if let count = try? result.get(), count > 100 {
self.sendArticleStatus(for: account) { _ in }
}
}
}
case .failure(let error):