[mgo] fix filtering by genre (#15087)
* [mgo] fix filtering by genre * bump
This commit is contained in:
parent
2e7414a197
commit
1fccdf3d28
|
@ -5,7 +5,7 @@ ext {
|
|||
extName = 'Mangago'
|
||||
pkgNameSuffix = 'en.mangago'
|
||||
extClass = '.Mangago'
|
||||
extVersionCode = 11
|
||||
extVersionCode = 12
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
|
|
|
@ -245,8 +245,8 @@ class Mangago : ParsedHttpSource() {
|
|||
|
||||
override fun getFilterList(): FilterList = FilterList(
|
||||
Filter.Header("Ignored if using text search"),
|
||||
StatusFilterGroup(),
|
||||
SortFilter(),
|
||||
StatusFilterGroup(),
|
||||
GenreFilterGroup(),
|
||||
)
|
||||
|
||||
|
@ -254,7 +254,7 @@ class Mangago : ParsedHttpSource() {
|
|||
fun addToUrl(builder: HttpUrl.Builder)
|
||||
}
|
||||
|
||||
private class StatusFilter(name: String, val query: String) : UriFilter, Filter.CheckBox(name) {
|
||||
private class StatusFilter(name: String, val query: String, state: Boolean) : UriFilter, Filter.CheckBox(name, state) {
|
||||
override fun addToUrl(builder: HttpUrl.Builder) {
|
||||
builder.addQueryParameter(query, if (state) "1" else "0")
|
||||
}
|
||||
|
@ -263,8 +263,8 @@ class Mangago : ParsedHttpSource() {
|
|||
private class StatusFilterGroup : UriFilter, Filter.Group<StatusFilter>(
|
||||
"Status",
|
||||
listOf(
|
||||
StatusFilter("Completed", "f"),
|
||||
StatusFilter("Ongoing", "o")
|
||||
StatusFilter("Completed", "f", true),
|
||||
StatusFilter("Ongoing", "o", true)
|
||||
)
|
||||
) {
|
||||
override fun addToUrl(builder: HttpUrl.Builder) {
|
||||
|
|
Loading…
Reference in New Issue