mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-20 03:39:19 +01: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,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…
Reference in New Issue
Block a user