mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-25 00:15:28 +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)
|
return TreeController(delegate: treeControllerDelegate)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
var isRootSplitCollapsed: Bool {
|
||||||
|
return rootSplitViewController.isCollapsed
|
||||||
|
}
|
||||||
|
|
||||||
var isThreePanelMode: Bool {
|
var isThreePanelMode: Bool {
|
||||||
return rootSplitViewController.traitCollection.userInterfaceIdiom == .pad && rootSplitViewController.displayMode == .allVisible
|
return rootSplitViewController.traitCollection.userInterfaceIdiom == .pad && rootSplitViewController.displayMode == .allVisible
|
||||||
}
|
}
|
||||||
|
@ -53,8 +53,8 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override func viewWillAppear(_ animated: Bool) {
|
override func viewWillAppear(_ animated: Bool) {
|
||||||
clearsSelectionOnViewWillAppear = true
|
|
||||||
navigationController?.title = NSLocalizedString("Feeds", comment: "Feeds")
|
navigationController?.title = NSLocalizedString("Feeds", comment: "Feeds")
|
||||||
|
clearsSelectionOnViewWillAppear = coordinator.isRootSplitCollapsed
|
||||||
super.viewWillAppear(animated)
|
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) {
|
override func viewDidAppear(_ animated: Bool) {
|
||||||
super.viewDidAppear(animated)
|
super.viewDidAppear(animated)
|
||||||
becomeFirstResponder()
|
becomeFirstResponder()
|
||||||
|
Loading…
Reference in New Issue
Block a user