Fix crash when resuming search user activity in unloaded explore VC

This commit is contained in:
Shadowfacts 2023-01-16 10:58:45 -05:00
parent ed2519848c
commit 4811747790
1 changed files with 1 additions and 0 deletions

View File

@ -257,6 +257,7 @@ class UserActivityManager {
if let navigationController = mainViewController.getTabController(tab: .explore) as? UINavigationController, if let navigationController = mainViewController.getTabController(tab: .explore) as? UINavigationController,
let exploreController = navigationController.viewControllers.first as? ExploreViewController { let exploreController = navigationController.viewControllers.first as? ExploreViewController {
navigationController.popToRootViewController(animated: false) navigationController.popToRootViewController(animated: false)
exploreController.loadViewIfNeeded()
exploreController.searchController.isActive = true exploreController.searchController.isActive = true
exploreController.searchController.searchBar.becomeFirstResponder() exploreController.searchController.searchBar.becomeFirstResponder()
} }