MangaEsp: Add "All" filter (#5850)

add all filter
This commit is contained in:
bapeey 2024-11-03 06:59:01 -05:00 committed by GitHub
parent 02f1962632
commit 2a1da726a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 7 additions and 2 deletions

View File

@ -7,6 +7,7 @@ sort_by_filter_views=Views
sort_by_filter_updated=Updated sort_by_filter_updated=Updated
sort_by_filter_added=Added sort_by_filter_added=Added
status_filter_title=Status status_filter_title=Status
status_filter_all=All
status_filter_ongoing=Ongoing status_filter_ongoing=Ongoing
status_filter_hiatus=Hiatus status_filter_hiatus=Hiatus
status_filter_dropped=Dropped status_filter_dropped=Dropped

View File

@ -7,6 +7,7 @@ sort_by_filter_views=Vistas
sort_by_filter_updated=Actualización sort_by_filter_updated=Actualización
sort_by_filter_added=Agregado sort_by_filter_added=Agregado
status_filter_title=Estado status_filter_title=Estado
status_filter_all=Todos
status_filter_ongoing=En curso status_filter_ongoing=En curso
status_filter_hiatus=En pausa status_filter_hiatus=En pausa
status_filter_dropped=Abandonado status_filter_dropped=Abandonado

View File

@ -2,7 +2,7 @@ plugins {
id("lib-multisrc") id("lib-multisrc")
} }
baseVersionCode = 2 baseVersionCode = 3
dependencies { dependencies {
api(project(":lib:i18n")) api(project(":lib:i18n"))

View File

@ -127,8 +127,10 @@ abstract class MangaEsp(
val statusFilter = filterList.firstInstanceOrNull<StatusFilter>() val statusFilter = filterList.firstInstanceOrNull<StatusFilter>()
if (statusFilter != null) { if (statusFilter != null) {
if (statusFilter.toUriPart() != 0) {
filteredList = filteredList.filter { it.status == statusFilter.toUriPart() }.toMutableList() filteredList = filteredList.filter { it.status == statusFilter.toUriPart() }.toMutableList()
} }
}
val sortByFilter = filterList.firstInstanceOrNull<SortByFilter>() val sortByFilter = filterList.firstInstanceOrNull<SortByFilter>()
@ -216,6 +218,7 @@ abstract class MangaEsp(
) )
protected open fun getStatusList() = arrayOf( protected open fun getStatusList() = arrayOf(
Pair(intl["status_filter_all"], 0),
Pair(intl["status_filter_ongoing"], 1), Pair(intl["status_filter_ongoing"], 1),
Pair(intl["status_filter_hiatus"], 2), Pair(intl["status_filter_hiatus"], 2),
Pair(intl["status_filter_dropped"], 3), Pair(intl["status_filter_dropped"], 3),