MyReadingManga: Not result for some filters (#7044)
fix filter with , in it
This commit is contained in:
parent
4bc138aa39
commit
60dcde32b1
|
@ -1,7 +1,7 @@
|
||||||
ext {
|
ext {
|
||||||
extName = 'MyReadingManga'
|
extName = 'MyReadingManga'
|
||||||
extClass = '.MyReadingMangaFactory'
|
extClass = '.MyReadingMangaFactory'
|
||||||
extVersionCode = 54
|
extVersionCode = 55
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -318,10 +318,19 @@ open class MyReadingManga(override val lang: String, private val siteLang: Strin
|
||||||
Filter.Select<String>(displayName, vals.map { it }.toTypedArray(), defaultValue), UriFilter {
|
Filter.Select<String>(displayName, vals.map { it }.toTypedArray(), defaultValue), UriFilter {
|
||||||
override fun addToUri(uri: Uri.Builder, uriParam: String) {
|
override fun addToUri(uri: Uri.Builder, uriParam: String) {
|
||||||
if (state != 0 || !firstIsUnspecified) {
|
if (state != 0 || !firstIsUnspecified) {
|
||||||
|
val splitFilter = vals[state].split(",")
|
||||||
|
when {
|
||||||
|
splitFilter.size == 1 -> {
|
||||||
|
val reversedFilter = splitFilter.reversed().joinToString(" | ").trim()
|
||||||
|
uri.appendQueryParameter(uriParam, "$uriValuePrefix:$reversedFilter")
|
||||||
|
}
|
||||||
|
else -> {
|
||||||
uri.appendQueryParameter(uriParam, "$uriValuePrefix:${vals[state]}")
|
uri.appendQueryParameter(uriParam, "$uriValuePrefix:${vals[state]}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a filter that is able to modify a URI.
|
* Represents a filter that is able to modify a URI.
|
||||||
|
|
Loading…
Reference in New Issue