newtoki: fix crash when changing sort filter (#1464)
* fix crash when changing sort filter * small touch-up
This commit is contained in:
parent
9d73eef491
commit
1d6ed34d77
|
@ -1,7 +1,7 @@
|
|||
ext {
|
||||
extName = 'NewToki / ManaToki'
|
||||
extClass = '.TokiFactory'
|
||||
extVersionCode = 30
|
||||
extVersionCode = 31
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ object ManaToki : NewToki("ManaToki", "comic", manaTokiPreferences) {
|
|||
}
|
||||
|
||||
is SearchSortTypeList -> {
|
||||
val state = filter.state ?: return@forEach
|
||||
val state = filter.state!!
|
||||
url.addQueryParameter("sst", arrayOf("wr_datetime", "wr_hit", "wr_good", "as_update")[state.index])
|
||||
url.addQueryParameter("sod", if (state.ascending) "asc" else "desc")
|
||||
}
|
||||
|
@ -161,6 +161,7 @@ object ManaToki : NewToki("ManaToki", "comic", manaTokiPreferences) {
|
|||
"추천순",
|
||||
"업데이트순",
|
||||
),
|
||||
Selection(0, false),
|
||||
)
|
||||
|
||||
override fun getFilterList() = FilterList(
|
||||
|
|
|
@ -23,7 +23,7 @@ object NewTokiWebtoon : NewToki("NewToki", "webtoon", newTokiPreferences) {
|
|||
}
|
||||
|
||||
is SearchSortTypeList -> {
|
||||
val state = filter.state ?: return@forEach
|
||||
val state = filter.state!!
|
||||
url.addQueryParameter("sst", arrayOf("as_update", "wr_hit", "wr_good")[state.index])
|
||||
url.addQueryParameter("sod", if (state.ascending) "asc" else "desc")
|
||||
}
|
||||
|
@ -132,6 +132,7 @@ object NewTokiWebtoon : NewToki("NewToki", "webtoon", newTokiPreferences) {
|
|||
"인기순",
|
||||
"추천순",
|
||||
),
|
||||
Selection(0, false),
|
||||
)
|
||||
|
||||
override fun getFilterList() = FilterList(
|
||||
|
|
Loading…
Reference in New Issue