Fix iPad Explore screen not restoring search state
This commit is contained in:
parent
2ba6b64485
commit
104981f3d3
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue