mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
Fix recents search not working when switching to the tab
this only happens in debug builds but doesn't hurt in prod
This commit is contained in:
parent
f6feb9f078
commit
ac6f7de1b3
1 changed files with 13 additions and 0 deletions
|
@ -453,6 +453,19 @@ class RecentsController(bundle: Bundle? = null) :
|
|||
}
|
||||
setBottomPadding()
|
||||
binding.downloadBottomSheet.dlBottomSheet.update()
|
||||
|
||||
val searchItem =
|
||||
(activity as? MainActivity)?.binding?.cardToolbar?.menu?.findItem(R.id.action_search)
|
||||
val searchView = searchItem?.actionView as? SearchView ?: return
|
||||
if (router.backstack.lastOrNull()?.controller != this) return
|
||||
setOnQueryTextChangeListener(searchView) {
|
||||
if (query != it) {
|
||||
query = it ?: return@setOnQueryTextChangeListener false
|
||||
resetProgressItem()
|
||||
refresh()
|
||||
}
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue