Don't rebuild the shadow table during launch for unread counts. Issue #1733

This commit is contained in:
Maurice Parker 2020-01-29 12:19:28 -07:00
parent 6b23cadc41
commit 967410e0f5

View File

@ -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