diff --git a/Frameworks/ArticlesDatabase/ArticlesTable.swift b/Frameworks/ArticlesDatabase/ArticlesTable.swift index 804e98157..85c28e83f 100644 --- a/Frameworks/ArticlesDatabase/ArticlesTable.swift +++ b/Frameworks/ArticlesDatabase/ArticlesTable.swift @@ -271,13 +271,11 @@ final class ArticlesTable: DatabaseTable { } func ensureStatuses(_ articleIDs: Set, _ 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 diff --git a/Frameworks/ArticlesDatabase/StatusesTable.swift b/Frameworks/ArticlesDatabase/StatusesTable.swift index 2619f1092..39dffb167 100644 --- a/Frameworks/ArticlesDatabase/StatusesTable.swift +++ b/Frameworks/ArticlesDatabase/StatusesTable.swift @@ -50,6 +50,7 @@ final class StatusesTable: DatabaseTable { // MARK: Marking + @discardableResult func mark(_ statuses: Set, _ statusKey: ArticleStatus.Key, _ flag: Bool, _ database: FMDatabase) -> Set? { // Sets flag in both memory and in database.