mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-22 23:58:36 +01:00
Keep table selections when root split isn't collapsed
This commit is contained in:
parent
52055d83f5
commit
54f6607621
@ -67,6 +67,10 @@ class AppCoordinator: NSObject, UndoableCommandRunner {
|
||||
return TreeController(delegate: treeControllerDelegate)
|
||||
}()
|
||||
|
||||
var isRootSplitCollapsed: Bool {
|
||||
return rootSplitViewController.isCollapsed
|
||||
}
|
||||
|
||||
var isThreePanelMode: Bool {
|
||||
return rootSplitViewController.traitCollection.userInterfaceIdiom == .pad && rootSplitViewController.displayMode == .allVisible
|
||||
}
|
||||
|
@ -53,8 +53,8 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
clearsSelectionOnViewWillAppear = true
|
||||
navigationController?.title = NSLocalizedString("Feeds", comment: "Feeds")
|
||||
clearsSelectionOnViewWillAppear = coordinator.isRootSplitCollapsed
|
||||
super.viewWillAppear(animated)
|
||||
}
|
||||
|
||||
|
@ -54,6 +54,11 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
|
||||
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
clearsSelectionOnViewWillAppear = coordinator.isRootSplitCollapsed
|
||||
super.viewWillAppear(animated)
|
||||
}
|
||||
|
||||
override func viewDidAppear(_ animated: Bool) {
|
||||
super.viewDidAppear(animated)
|
||||
becomeFirstResponder()
|
||||
|
Loading…
Reference in New Issue
Block a user