diff --git a/iOS/MasterFeed/MasterFeedViewController.swift b/iOS/MasterFeed/MasterFeedViewController.swift index 7fb07f9ce..c76cad5b6 100644 --- a/iOS/MasterFeed/MasterFeedViewController.swift +++ b/iOS/MasterFeed/MasterFeedViewController.swift @@ -277,7 +277,7 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner { override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { becomeFirstResponder() - coordinator.selectFeed(indexPath, automated: false) + coordinator.selectFeed(indexPath, animated: true) } override func tableView(_ tableView: UITableView, targetIndexPathForMoveFromRowAt sourceIndexPath: IndexPath, toProposedIndexPath proposedDestinationIndexPath: IndexPath) -> IndexPath { diff --git a/iOS/MasterTimeline/MasterTimelineViewController.swift b/iOS/MasterTimeline/MasterTimelineViewController.swift index 317ee840d..56ec766f8 100644 --- a/iOS/MasterTimeline/MasterTimelineViewController.swift +++ b/iOS/MasterTimeline/MasterTimelineViewController.swift @@ -147,13 +147,13 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner applyChanges(animate: animate) } - func updateArticleSelection(animate: Bool) { + 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) } } else { - tableView.selectRow(at: nil, animated: animate, scrollPosition: .none) + tableView.selectRow(at: nil, animated: animated, scrollPosition: .none) } updateUI() @@ -293,7 +293,7 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { becomeFirstResponder() let article = dataSource.itemIdentifier(for: indexPath) - coordinator.selectArticle(article, automated: false) + coordinator.selectArticle(article, animated: true) } // MARK: Notifications diff --git a/iOS/SceneCoordinator.swift b/iOS/SceneCoordinator.swift index 50d8c6bd7..6ad03b19a 100644 --- a/iOS/SceneCoordinator.swift +++ b/iOS/SceneCoordinator.swift @@ -513,7 +513,7 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider { return indexPathFor(node) } - func selectFeed(_ indexPath: IndexPath?, automated: Bool = true) { + func selectFeed(_ indexPath: IndexPath?, animated: Bool = false) { guard indexPath != currentFeedIndexPath else { return } selectArticle(nil) @@ -524,12 +524,12 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider { if let ip = indexPath, let node = nodeFor(ip), let fetcher = node.representedObject as? ArticleFetcher { timelineFetcher = fetcher updateSelectingActivity(with: node) - installTimelineControllerIfNecessary(animated: !automated) + installTimelineControllerIfNecessary(animated: animated) } else { timelineFetcher = nil activityManager.invalidateSelecting() if rootSplitViewController.isCollapsed && navControllerForTimeline().viewControllers.last is MasterTimelineViewController { - navControllerForTimeline().popViewController(animated: !automated) + navControllerForTimeline().popViewController(animated: animated) } } @@ -565,7 +565,7 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider { } } - func selectArticle(_ article: Article?, automated: Bool = true) { + func selectArticle(_ article: Article?, animated: Bool = false) { guard article != currentArticle else { return } stopArticleExtractor() @@ -575,12 +575,12 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider { if article == nil { if rootSplitViewController.isCollapsed { if masterNavigationController.children.last is ArticleViewController { - masterNavigationController.popViewController(animated: !automated) + masterNavigationController.popViewController(animated: animated) } } else { articleViewController?.state = .noSelection } - masterTimelineViewController?.updateArticleSelection(animate: !automated) + masterTimelineViewController?.updateArticleSelection(animated: animated) return } @@ -588,14 +588,12 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider { if articleViewController == nil { currentArticleViewController = UIStoryboard.main.instantiateController(ofType: ArticleViewController.self) currentArticleViewController.coordinator = self - installArticleController(currentArticleViewController, automated: automated) + installArticleController(currentArticleViewController, animated: animated) } else { currentArticleViewController = articleViewController! } - if automated { - masterTimelineViewController?.updateArticleSelection(animate: false) - } + masterTimelineViewController?.updateArticleSelection(animated: animated) if article!.feed?.isArticleExtractorAlwaysOn ?? false { startArticleExtractorForCurrentLink() @@ -1200,7 +1198,7 @@ private extension SceneCoordinator { for i in startingRow..