From 2a1da726a739f7e38bbdae9197d0a0d763cca319 Mon Sep 17 00:00:00 2001 From: bapeey <90949336+bapeey@users.noreply.github.com> Date: Sun, 3 Nov 2024 06:59:01 -0500 Subject: [PATCH] MangaEsp: Add "All" filter (#5850) add all filter --- lib-multisrc/mangaesp/assets/i18n/messages_en.properties | 1 + lib-multisrc/mangaesp/assets/i18n/messages_es.properties | 1 + lib-multisrc/mangaesp/build.gradle.kts | 2 +- .../src/eu/kanade/tachiyomi/multisrc/mangaesp/MangaEsp.kt | 5 ++++- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib-multisrc/mangaesp/assets/i18n/messages_en.properties b/lib-multisrc/mangaesp/assets/i18n/messages_en.properties index 745010946..b335a8cc6 100644 --- a/lib-multisrc/mangaesp/assets/i18n/messages_en.properties +++ b/lib-multisrc/mangaesp/assets/i18n/messages_en.properties @@ -7,6 +7,7 @@ sort_by_filter_views=Views sort_by_filter_updated=Updated sort_by_filter_added=Added status_filter_title=Status +status_filter_all=All status_filter_ongoing=Ongoing status_filter_hiatus=Hiatus status_filter_dropped=Dropped diff --git a/lib-multisrc/mangaesp/assets/i18n/messages_es.properties b/lib-multisrc/mangaesp/assets/i18n/messages_es.properties index 0aa8467d6..ecc7b99c9 100644 --- a/lib-multisrc/mangaesp/assets/i18n/messages_es.properties +++ b/lib-multisrc/mangaesp/assets/i18n/messages_es.properties @@ -7,6 +7,7 @@ sort_by_filter_views=Vistas sort_by_filter_updated=ActualizaciĆ³n sort_by_filter_added=Agregado status_filter_title=Estado +status_filter_all=Todos status_filter_ongoing=En curso status_filter_hiatus=En pausa status_filter_dropped=Abandonado diff --git a/lib-multisrc/mangaesp/build.gradle.kts b/lib-multisrc/mangaesp/build.gradle.kts index 213cd2b08..824b7d885 100644 --- a/lib-multisrc/mangaesp/build.gradle.kts +++ b/lib-multisrc/mangaesp/build.gradle.kts @@ -2,7 +2,7 @@ plugins { id("lib-multisrc") } -baseVersionCode = 2 +baseVersionCode = 3 dependencies { api(project(":lib:i18n")) diff --git a/lib-multisrc/mangaesp/src/eu/kanade/tachiyomi/multisrc/mangaesp/MangaEsp.kt b/lib-multisrc/mangaesp/src/eu/kanade/tachiyomi/multisrc/mangaesp/MangaEsp.kt index 25abe935f..a4907e944 100644 --- a/lib-multisrc/mangaesp/src/eu/kanade/tachiyomi/multisrc/mangaesp/MangaEsp.kt +++ b/lib-multisrc/mangaesp/src/eu/kanade/tachiyomi/multisrc/mangaesp/MangaEsp.kt @@ -127,7 +127,9 @@ abstract class MangaEsp( val statusFilter = filterList.firstInstanceOrNull() if (statusFilter != null) { - filteredList = filteredList.filter { it.status == statusFilter.toUriPart() }.toMutableList() + if (statusFilter.toUriPart() != 0) { + filteredList = filteredList.filter { it.status == statusFilter.toUriPart() }.toMutableList() + } } val sortByFilter = filterList.firstInstanceOrNull() @@ -216,6 +218,7 @@ abstract class MangaEsp( ) protected open fun getStatusList() = arrayOf( + Pair(intl["status_filter_all"], 0), Pair(intl["status_filter_ongoing"], 1), Pair(intl["status_filter_hiatus"], 2), Pair(intl["status_filter_dropped"], 3),