Prevent automated scrolling when selecting an article in the timeline
This commit is contained in:
parent
c405fdf583
commit
746c06d147
|
@ -270,7 +270,7 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
|
||||||
}
|
}
|
||||||
|
|
||||||
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||||
coordinator.selectArticle(indexPath)
|
coordinator.selectArticle(indexPath, automated: false)
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: Notifications
|
// MARK: Notifications
|
||||||
|
|
|
@ -501,7 +501,7 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider {
|
||||||
selectArticle(nil)
|
selectArticle(nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func selectArticle(_ indexPath: IndexPath?) {
|
func selectArticle(_ indexPath: IndexPath?, automated: Bool = true) {
|
||||||
currentArticleIndexPath = indexPath
|
currentArticleIndexPath = indexPath
|
||||||
activityManager.reading(currentArticle)
|
activityManager.reading(currentArticle)
|
||||||
|
|
||||||
|
@ -531,7 +531,10 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider {
|
||||||
rootSplitViewController.preferredDisplayMode = .automatic
|
rootSplitViewController.preferredDisplayMode = .automatic
|
||||||
}
|
}
|
||||||
|
|
||||||
masterTimelineViewController?.updateArticleSelection(animate: true)
|
if automated {
|
||||||
|
masterTimelineViewController?.updateArticleSelection(animate: true)
|
||||||
|
}
|
||||||
|
|
||||||
detailViewController?.updateArticleSelection()
|
detailViewController?.updateArticleSelection()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue