Clear selected article if you are using a phone and navigate away from the detail controller

This commit is contained in:
Maurice Parker 2019-09-11 13:48:53 -05:00
parent 42d19ba157
commit cf6a9c45b4
1 changed files with 6 additions and 1 deletions

View File

@ -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)
}
}
}