Merge branch 'mac-candidate'

This commit is contained in:
Brent Simmons 2019-07-08 21:13:00 -07:00
commit 3c4379dfeb
2 changed files with 3 additions and 4 deletions

View File

@ -271,13 +271,11 @@ final class ArticlesTable: DatabaseTable {
}
func ensureStatuses(_ articleIDs: Set<String>, _ statusKey: ArticleStatus.Key, _ flag: Bool) {
self.queue.updateSync { (database) in
self.queue.update { (database) in
let statusesDictionary = self.statusesTable.ensureStatusesForArticleIDs(articleIDs, false, database)
let statuses = Set(statusesDictionary.values)
_ = self.statusesTable.mark(statuses, statusKey, flag, database)
self.statusesTable.mark(statuses, statusKey, flag, database)
}
}
// MARK: Unread Counts

View File

@ -50,6 +50,7 @@ final class StatusesTable: DatabaseTable {
// MARK: Marking
@discardableResult
func mark(_ statuses: Set<ArticleStatus>, _ statusKey: ArticleStatus.Key, _ flag: Bool, _ database: FMDatabase) -> Set<ArticleStatus>? {
// Sets flag in both memory and in database.