From 24634dfaaa60381332d4376358c4d247f5b7df8f Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Wed, 27 Nov 2019 15:21:39 -0600 Subject: [PATCH] Optimize the initial load so that a Filtered Feeds state restoration doesn't animate on startup --- iOS/SceneCoordinator.swift | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/iOS/SceneCoordinator.swift b/iOS/SceneCoordinator.swift index ac9e59e23..c75193ef9 100644 --- a/iOS/SceneCoordinator.swift +++ b/iOS/SceneCoordinator.swift @@ -344,11 +344,15 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider { } } - rebuildBackingStores(initialLoad: true) - // You can't assign the Feeds Read Filter until we've built the backing stores at least once or there is nothing // for state restoration to work with while we are waiting for the unread counts to initialize. if let readFeedsFilterState = windowState[UserInfoKey.readFeedsFilterState] as? Bool { + if readFeedsFilterState { + treeController.rebuild() + rebuildShadowTable() + } else { + rebuildBackingStores(initialLoad: true) + } treeControllerDelegate.isReadFiltered = readFeedsFilterState } @@ -424,7 +428,7 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider { return } if isReadFeedsFiltered { - rebuildBackingStores() + rebuildBackingStores(initialLoad: true) } }