mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
Fixed browse source search not working the first time
no idea how it broke but this should fix it all the same
This commit is contained in:
parent
dd877edb49
commit
2c3a5de679
1 changed files with 12 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
package eu.kanade.tachiyomi.ui.source.browse
|
||||
|
||||
import android.app.Activity
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
|
@ -392,6 +393,17 @@ open class BrowseSourceController(bundle: Bundle) :
|
|||
adapter.onLoadMoreComplete(mangas)
|
||||
}
|
||||
|
||||
override fun onActivityResumed(activity: Activity) {
|
||||
super.onActivityResumed(activity)
|
||||
|
||||
val searchItem = (activity as? MainActivity)?.binding?.cardToolbar?.menu?.findItem(R.id.action_search)
|
||||
val searchView = searchItem?.actionView as? SearchView ?: return
|
||||
setOnQueryTextChangeListener(searchView, onlyOnSubmit = true, hideKbOnSubmit = false) {
|
||||
searchWithQuery(it ?: "")
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called from the presenter when the network request fails.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue