From e4f809be997ef0ac9c1be94a86347c6f37f65d23 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sun, 7 Jul 2019 20:01:37 -0700 Subject: [PATCH 1/3] Update RSWeb. --- submodules/RSWeb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/RSWeb b/submodules/RSWeb index b236f5762..bbb58ff2a 160000 --- a/submodules/RSWeb +++ b/submodules/RSWeb @@ -1 +1 @@ -Subproject commit b236f57627cb8aa3feac835689754d4863eb1788 +Subproject commit bbb58ff2afb539ff65816793754933ae9db8f259 From 3d0d6fa8a92a7edc30bb57a50743c092e8b2e418 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Mon, 8 Jul 2019 21:09:16 -0700 Subject: [PATCH 2/3] =?UTF-8?q?Mark=20function=20as=20having=20@discardabl?= =?UTF-8?q?eResult,=20because=20we=20don=E2=80=99t=20always=20care=20about?= =?UTF-8?q?=20the=20result.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Frameworks/ArticlesDatabase/StatusesTable.swift | 1 + 1 file changed, 1 insertion(+) 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. From 33ff7c94c3635ba44af547f15f1e9fb3d1b77c47 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Mon, 8 Jul 2019 21:09:54 -0700 Subject: [PATCH 3/3] Make articlesTable.ensureStatuses non-blocking. --- Frameworks/ArticlesDatabase/ArticlesTable.swift | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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