mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-20 08: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() {
|
fun performFilter() {
|
||||||
val s = getFilter(String::class.java)
|
val s = getFilter(String::class.java)
|
||||||
if (s.isNullOrBlank()) {
|
if (s.isNullOrBlank()) {
|
||||||
|
if (mangas.firstOrNull()?.filter?.isNotBlank() == true) {
|
||||||
|
mangas.forEach { it.filter = "" }
|
||||||
|
}
|
||||||
updateDataSet(mangas)
|
updateDataSet(mangas)
|
||||||
} else {
|
} else {
|
||||||
updateDataSet(mangas.filter { it.filter(s) })
|
updateDataSet(mangas.filter { it.filter(s) })
|
||||||
@ -120,6 +123,9 @@ class LibraryCategoryAdapter(val controller: LibraryController) :
|
|||||||
suspend fun performFilterAsync() {
|
suspend fun performFilterAsync() {
|
||||||
val s = getFilter(String::class.java)
|
val s = getFilter(String::class.java)
|
||||||
if (s.isNullOrBlank()) {
|
if (s.isNullOrBlank()) {
|
||||||
|
if (mangas.firstOrNull()?.filter?.isNotBlank() == true) {
|
||||||
|
mangas.forEach { it.filter = "" }
|
||||||
|
}
|
||||||
updateDataSet(mangas)
|
updateDataSet(mangas)
|
||||||
} else {
|
} else {
|
||||||
val filteredManga = withDefContext { mangas.filter { it.filter(s) } }
|
val filteredManga = withDefContext { mangas.filter { it.filter(s) } }
|
||||||
|
Loading…
Reference in New Issue
Block a user