Fix iPad Explore screen not restoring search state

This commit is contained in:
Shadowfacts 2023-02-25 18:30:05 -05:00
parent 2ba6b64485
commit 104981f3d3

View File

@ -77,3 +77,13 @@ class InlineTrendsViewController: UIViewController {
} }
} }
extension InlineTrendsViewController: StateRestorableViewController {
func stateRestorationActivity() -> NSUserActivity? {
if searchController.isActive {
return UserActivityManager.searchActivity(query: searchController.searchBar.text, accountID: mastodonController.accountInfo!.id)
} else {
return nil
}
}
}