forked from shadowfacts/Tusker
Fix crash when resuming search user activity in unloaded explore VC
This commit is contained in:
parent
ed2519848c
commit
4811747790
|
@ -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()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue