forked from shadowfacts/Tusker
Fix crash when resizing split view on iPad if Explore search controller
hadn't been created yet
This commit is contained in:
parent
77ac8cbe40
commit
b55a96d649
|
@ -217,7 +217,7 @@ extension MainSplitViewController: UISplitViewControllerDelegate {
|
|||
// If the tab navigation stack has only one item or the search controller is active, it corresponds to the Search item
|
||||
// For other items, the 2nd VC in the nav stack determines which sidebar item they map to.
|
||||
// Search screen has special considerations, all others can be transferred directly.
|
||||
if tabNavigationStack.count == 1 || ((tabNavigationStack.first as? ExploreViewController)?.searchController.isActive ?? false) {
|
||||
if tabNavigationStack.count == 1 || ((tabNavigationStack.first as? ExploreViewController)?.searchController?.isActive ?? false) {
|
||||
exploreItem = .search
|
||||
let searchVC = SearchViewController(mastodonController: mastodonController)
|
||||
searchVC.loadViewIfNeeded()
|
||||
|
|
Loading…
Reference in New Issue