Make articlesTable.ensureStatuses non-blocking.
This commit is contained in:
parent
3d0d6fa8a9
commit
33ff7c94c3
|
@ -271,13 +271,11 @@ final class ArticlesTable: DatabaseTable {
|
||||||
}
|
}
|
||||||
|
|
||||||
func ensureStatuses(_ articleIDs: Set<String>, _ statusKey: ArticleStatus.Key, _ flag: Bool) {
|
func ensureStatuses(_ articleIDs: Set<String>, _ statusKey: ArticleStatus.Key, _ flag: Bool) {
|
||||||
|
self.queue.update { (database) in
|
||||||
self.queue.updateSync { (database) in
|
|
||||||
let statusesDictionary = self.statusesTable.ensureStatusesForArticleIDs(articleIDs, false, database)
|
let statusesDictionary = self.statusesTable.ensureStatusesForArticleIDs(articleIDs, false, database)
|
||||||
let statuses = Set(statusesDictionary.values)
|
let statuses = Set(statusesDictionary.values)
|
||||||
_ = self.statusesTable.mark(statuses, statusKey, flag, database)
|
self.statusesTable.mark(statuses, statusKey, flag, database)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: Unread Counts
|
// MARK: Unread Counts
|
||||||
|
|
Loading…
Reference in New Issue