mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Only clear Feed/Timeline selection after view begins to appear. Issue #1156
This commit is contained in:
@@ -76,7 +76,6 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
clearsSelectionOnViewWillAppear = coordinator.isRootSplitCollapsed
|
||||
applyChanges(animate: false)
|
||||
super.viewWillAppear(animated)
|
||||
}
|
||||
@@ -132,7 +131,7 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
|
||||
func restoreSelectionIfNecessary(adjustScroll: Bool) {
|
||||
if let article = coordinator.currentArticle, let indexPath = dataSource.indexPath(for: article) {
|
||||
if adjustScroll {
|
||||
tableView.selectRowAndScrollIfNotVisible(at: indexPath, animated: false, deselect: coordinator.isRootSplitCollapsed)
|
||||
tableView.selectRowAndScrollIfNotVisible(at: indexPath, animated: false)
|
||||
} else {
|
||||
tableView.selectRow(at: indexPath, animated: false, scrollPosition: .none)
|
||||
}
|
||||
@@ -150,7 +149,7 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
|
||||
func updateArticleSelection(animated: Bool) {
|
||||
if let article = coordinator.currentArticle, let indexPath = dataSource.indexPath(for: article) {
|
||||
if tableView.indexPathForSelectedRow != indexPath {
|
||||
tableView.selectRowAndScrollIfNotVisible(at: indexPath, animated: true, deselect: coordinator.isRootSplitCollapsed)
|
||||
tableView.selectRowAndScrollIfNotVisible(at: indexPath, animated: true)
|
||||
}
|
||||
} else {
|
||||
tableView.selectRow(at: nil, animated: animated, scrollPosition: .none)
|
||||
|
||||
Reference in New Issue
Block a user