From cf6a9c45b44f0ccfe5d143f7e2e866bf9d3934dc Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Wed, 11 Sep 2019 13:48:53 -0500 Subject: [PATCH] Clear selected article if you are using a phone and navigate away from the detail controller --- iOS/SceneCoordinator.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/iOS/SceneCoordinator.swift b/iOS/SceneCoordinator.swift index 8b8cfdbf2..4c9b8d82d 100644 --- a/iOS/SceneCoordinator.swift +++ b/iOS/SceneCoordinator.swift @@ -606,7 +606,7 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider { installTimelineControllerIfNecessary(animated: !automated) } else { timelineFetcher = nil - + activityManager.invalidateSelecting() if rootSplitViewController.isCollapsed && navControllerForTimeline().viewControllers.last is MasterTimelineViewController { navControllerForTimeline().popViewController(animated: !automated) } @@ -1016,6 +1016,11 @@ extension SceneCoordinator: UINavigationControllerDelegate { selectFeed(nil) } + // If we are using a phone and navigate away from the detail, clear up the article resources (including activity) + if viewController === masterTimelineViewController && !isThreePanelMode && rootSplitViewController.isCollapsed { + selectArticle(nil) + } + } }