mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-20 06:29:17 +01:00
Fixed #811
This commit is contained in:
parent
1a8d724d0a
commit
88ba5544fe
@ -110,6 +110,9 @@ class LibraryCategoryAdapter(val controller: LibraryController) :
|
||||
fun performFilter() {
|
||||
val s = getFilter(String::class.java)
|
||||
if (s.isNullOrBlank()) {
|
||||
if (mangas.firstOrNull()?.filter?.isNotBlank() == true) {
|
||||
mangas.forEach { it.filter = "" }
|
||||
}
|
||||
updateDataSet(mangas)
|
||||
} else {
|
||||
updateDataSet(mangas.filter { it.filter(s) })
|
||||
@ -120,6 +123,9 @@ class LibraryCategoryAdapter(val controller: LibraryController) :
|
||||
suspend fun performFilterAsync() {
|
||||
val s = getFilter(String::class.java)
|
||||
if (s.isNullOrBlank()) {
|
||||
if (mangas.firstOrNull()?.filter?.isNotBlank() == true) {
|
||||
mangas.forEach { it.filter = "" }
|
||||
}
|
||||
updateDataSet(mangas)
|
||||
} else {
|
||||
val filteredManga = withDefContext { mangas.filter { it.filter(s) } }
|
||||
|
Loading…
Reference in New Issue
Block a user