diff --git a/iOS/MasterFeed/MasterFeedViewController.swift b/iOS/MasterFeed/MasterFeedViewController.swift index 6dc3d6e88..22cda2500 100644 --- a/iOS/MasterFeed/MasterFeedViewController.swift +++ b/iOS/MasterFeed/MasterFeedViewController.swift @@ -387,6 +387,8 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner { if tableView.indexPathForSelectedRow != indexPath { tableView.selectRow(at: indexPath, animated: true, scrollPosition: .middle) } + } else { + tableView.selectRow(at: nil, animated: true, scrollPosition: .none) } } diff --git a/iOS/SceneCoordinator.swift b/iOS/SceneCoordinator.swift index 69e304caf..f3697a68f 100644 --- a/iOS/SceneCoordinator.swift +++ b/iOS/SceneCoordinator.swift @@ -549,7 +549,7 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider { func beginSearching() { isSearching = true searchArticleIds = Set(articles.map { $0.articleID }) - timelineFetcher = nil + selectFeed(nil) } func endSearching() { @@ -560,6 +560,8 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider { if let ip = currentMasterIndexPath, let node = nodeFor(ip), let fetcher = node.representedObject as? ArticleFetcher { timelineFetcher = fetcher + } else { + timelineFetcher = nil } }