mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-10 17:02:54 +01:00
Auto expand newly activated accounts.
This commit is contained in:
parent
ea064c1e2e
commit
a85d266253
@ -395,13 +395,25 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@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() {
|
||||||
fetchAndReplaceArticlesAsync(animated: true) {
|
fetchAndReplaceArticlesAsync(animated: true) {
|
||||||
self.masterTimelineViewController?.reinitializeArticles()
|
self.masterTimelineViewController?.reinitializeArticles()
|
||||||
self.rebuildBackingStores()
|
self.rebuildBackingStores() {
|
||||||
|
expandNewlyActivatedAccount()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
rebuildBackingStores()
|
rebuildBackingStores() {
|
||||||
|
expandNewlyActivatedAccount()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user