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 {
|
||||
extName = 'MyReadingManga'
|
||||
extClass = '.MyReadingMangaFactory'
|
||||
extVersionCode = 54
|
||||
extVersionCode = 55
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
|
|
|
@ -318,7 +318,16 @@ open class MyReadingManga(override val lang: String, private val siteLang: Strin
|
|||
Filter.Select<String>(displayName, vals.map { it }.toTypedArray(), defaultValue), UriFilter {
|
||||
override fun addToUri(uri: Uri.Builder, uriParam: String) {
|
||||
if (state != 0 || !firstIsUnspecified) {
|
||||
uri.appendQueryParameter(uriParam, "$uriValuePrefix:${vals[state]}")
|
||||
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]}")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue