Fix issue where over optimization was causing crashes due to the diffable datasource not being available

This commit is contained in:
Maurice Parker 2019-11-27 19:54:52 -06:00
parent 95debf3e61
commit 219b5a89ba
1 changed files with 3 additions and 7 deletions

View File

@ -343,16 +343,12 @@ 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
}