Prevent automated scrolling when selecting an article in the timeline

This commit is contained in:
Maurice Parker 2019-09-02 12:05:11 -05:00
parent c405fdf583
commit 746c06d147
2 changed files with 6 additions and 3 deletions

View File

@ -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

View File

@ -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
} }
if automated {
masterTimelineViewController?.updateArticleSelection(animate: true) masterTimelineViewController?.updateArticleSelection(animate: true)
}
detailViewController?.updateArticleSelection() detailViewController?.updateArticleSelection()
} }