From 88ba5544feb3711f1e350388fabd789ee8c31c59 Mon Sep 17 00:00:00 2001 From: Jays2Kings Date: Wed, 12 May 2021 14:03:44 -0400 Subject: [PATCH] Fixed #811 --- .../kanade/tachiyomi/ui/library/LibraryCategoryAdapter.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryAdapter.kt index c9904eb8b8..d0f5b70265 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryAdapter.kt @@ -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) } }