From 8bbc8d42a1db76e6258dcada2ac905e83ebeea3f Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Fri, 11 Nov 2022 17:39:28 -0600 Subject: [PATCH] Prevent scrolling if the feed selection was done by the user --- iOS/MasterFeed/MasterFeedViewController.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/iOS/MasterFeed/MasterFeedViewController.swift b/iOS/MasterFeed/MasterFeedViewController.swift index a47e46cda..6b6da7579 100644 --- a/iOS/MasterFeed/MasterFeedViewController.swift +++ b/iOS/MasterFeed/MasterFeedViewController.swift @@ -530,7 +530,9 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner, Ma func updateFeedSelection(animations: Animations) { if let indexPath = coordinator.currentFeedIndexPath { - tableView.selectRowAndScrollIfNotVisible(at: indexPath, animations: animations) + if indexPath != tableView.indexPathForSelectedRow { + tableView.selectRowAndScrollIfNotVisible(at: indexPath, animations: animations) + } } else { if let indexPath = tableView.indexPathForSelectedRow { if animations.contains(.select) {