From d68eccc55e83838bb33c8d70d577e47f40174e6c Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Wed, 15 Jan 2020 17:53:12 -0700 Subject: [PATCH] Exit search if Go To Feed is selected. Issue #1557 --- iOS/MasterTimeline/MasterTimelineViewController.swift | 4 ++++ iOS/SceneCoordinator.swift | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/iOS/MasterTimeline/MasterTimelineViewController.swift b/iOS/MasterTimeline/MasterTimelineViewController.swift index b89a27d4b..c45568971 100644 --- a/iOS/MasterTimeline/MasterTimelineViewController.swift +++ b/iOS/MasterTimeline/MasterTimelineViewController.swift @@ -198,6 +198,10 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner updateUI() } + + func hideSearch() { + navigationItem.searchController?.isActive = false + } func showSearchAll() { navigationItem.searchController?.isActive = true diff --git a/iOS/SceneCoordinator.swift b/iOS/SceneCoordinator.swift index 8158c7a0f..9a2105f6c 100644 --- a/iOS/SceneCoordinator.swift +++ b/iOS/SceneCoordinator.swift @@ -940,6 +940,10 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider { } func discloseFeed(_ feed: WebFeed, animated: Bool, completion: (() -> Void)? = nil) { + if isSearching { + masterTimelineViewController?.hideSearch() + } + masterFeedViewController.discloseFeed(feed, animated: animated) { completion?() }