From 967410e0f54b6b7100ea26d5ca9a9c9e9d6b43b5 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Wed, 29 Jan 2020 12:19:28 -0700 Subject: [PATCH] Don't rebuild the shadow table during launch for unread counts. Issue #1733 --- iOS/SceneCoordinator.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/iOS/SceneCoordinator.swift b/iOS/SceneCoordinator.swift index 14129bbdb..11833219e 100644 --- a/iOS/SceneCoordinator.swift +++ b/iOS/SceneCoordinator.swift @@ -445,6 +445,11 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider { } @objc func unreadCountDidChange(_ note: Notification) { + // We will handle the filtering of unread feeds in unreadCountDidInitialize after they have all be calculated + guard AccountManager.shared.isUnreadCountsInitialized else { + return + } + // If we are filtering reads, the new unread count is greater than 1, and the feed isn't shown then continue guard let feed = note.object as? Feed, isReadFeedsFiltered, feed.unreadCount > 0, !shadowTableContains(feed) else { return