From a68ca58242125bd94ba0fd6f863bdab20d315c78 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sat, 6 Jul 2019 11:50:22 -0700 Subject: [PATCH] Remove a precondition that is no longer valid when doing async fetches. --- Frameworks/Account/Account.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Frameworks/Account/Account.swift b/Frameworks/Account/Account.swift index d1272f17f..dfa0ea452 100644 --- a/Frameworks/Account/Account.swift +++ b/Frameworks/Account/Account.swift @@ -886,8 +886,7 @@ private extension Account { // Now we loop through articles exactly once. This makes a huge difference. var unreadCountStorage = [String: Int]() // [FeedID: Int] - articles.forEach { (article) in - precondition(!article.status.read) + for article in articles where !article.status.read { unreadCountStorage[article.feedID, default: 0] += 1 } feeds.forEach { (feed) in