mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2025-01-25 21:21:12 +01:00
Searching in library now moves to the top of the list on text change
This commit is contained in:
parent
2d520026a1
commit
9572c9b7ee
@ -1118,6 +1118,9 @@ class LibraryController(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun search(query: String?): Boolean {
|
fun search(query: String?): Boolean {
|
||||||
|
if (query != this.query && !query.isNullOrBlank()) {
|
||||||
|
binding.libraryGridRecycler.recycler.scrollToPosition(0)
|
||||||
|
}
|
||||||
this.query = query ?: ""
|
this.query = query ?: ""
|
||||||
if (this.query.isNotBlank() && adapter.scrollableHeaders.isEmpty()) {
|
if (this.query.isNotBlank() && adapter.scrollableHeaders.isEmpty()) {
|
||||||
searchItem.string = this.query
|
searchItem.string = this.query
|
||||||
|
Loading…
x
Reference in New Issue
Block a user