From d2a09a92aee0eb3f480b245c3be99e1334abf7e0 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Fri, 19 Jul 2019 17:27:56 -0500 Subject: [PATCH] Fix timeline selection in three pane mode --- iOS/AppCoordinator.swift | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/iOS/AppCoordinator.swift b/iOS/AppCoordinator.swift index 70eb0635f..be47ba0b4 100644 --- a/iOS/AppCoordinator.swift +++ b/iOS/AppCoordinator.swift @@ -441,10 +441,14 @@ class AppCoordinator: NSObject, UndoableCommandRunner { } func selectFeed(_ indexPath: IndexPath) { - masterTimelineViewController = UIStoryboard.main.instantiateController(ofType: MasterTimelineViewController.self) - masterTimelineViewController!.coordinator = self - currentMasterIndexPath = indexPath - navControllerForTimeline().pushViewController(masterTimelineViewController!, animated: true) + if let _ = navControllerForTimeline().viewControllers.first as? MasterTimelineViewController { + currentMasterIndexPath = indexPath + } else { + masterTimelineViewController = UIStoryboard.main.instantiateController(ofType: MasterTimelineViewController.self) + masterTimelineViewController!.coordinator = self + currentMasterIndexPath = indexPath + navControllerForTimeline().pushViewController(masterTimelineViewController!, animated: true) + } } func selectArticle(_ indexPath: IndexPath) {