Remove code to auto expand reactivated accounts

This commit is contained in:
Maurice Parker 2021-10-21 09:44:07 -05:00
parent 99d24e1623
commit 245a648293
1 changed files with 2 additions and 11 deletions

View File

@ -511,23 +511,14 @@ class SceneCoordinator: NSObject, UndoableCommandRunner {
} }
@objc func accountStateDidChange(_ note: Notification) { @objc func accountStateDidChange(_ note: Notification) {
let expandNewlyActivatedAccount = {
if let account = note.userInfo?[Account.UserInfoKey.account] as? Account,
account.isActive,
let node = self.treeController.rootNode.childNodeRepresentingObject(account) {
self.markExpanded(node)
}
}
if timelineFetcherContainsAnyPseudoFeed() { if timelineFetcherContainsAnyPseudoFeed() {
fetchAndMergeArticlesAsync(animated: true) { fetchAndMergeArticlesAsync(animated: true) {
self.masterTimelineViewController?.reinitializeArticles(resetScroll: false) self.masterTimelineViewController?.reinitializeArticles(resetScroll: false)
self.rebuildBackingStores(updateExpandedNodes: expandNewlyActivatedAccount) self.rebuildBackingStores()
} }
} else { } else {
self.rebuildBackingStores(updateExpandedNodes: expandNewlyActivatedAccount) self.rebuildBackingStores()
} }
} }
@objc func userDidAddAccount(_ note: Notification) { @objc func userDidAddAccount(_ note: Notification) {