From a68ca58242125bd94ba0fd6f863bdab20d315c78 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sat, 6 Jul 2019 11:50:22 -0700 Subject: [PATCH 1/2] 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 From fbb7b9961c7e341895dd7dec6cb7ba656749d34b Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sat, 6 Jul 2019 11:52:15 -0700 Subject: [PATCH 2/2] Change an import Cocoa to import AppKit. --- Shared/Favicons/ColorHash.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Shared/Favicons/ColorHash.swift b/Shared/Favicons/ColorHash.swift index 8849a0fe3..650a70b76 100644 --- a/Shared/Favicons/ColorHash.swift +++ b/Shared/Favicons/ColorHash.swift @@ -13,7 +13,7 @@ import UIKit #elseif os(watchOS) import WatchKit #elseif os(OSX) -import Cocoa +import AppKit #endif public class ColorHash {