mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-21 18:43:55 +00:00
fix: splitted status list and cleaned up
This commit is contained in:
@@ -45,7 +45,14 @@ object Anilist {
|
||||
"SCORE"
|
||||
)
|
||||
|
||||
val status = listOf(
|
||||
val animeStatus = listOf(
|
||||
"FINISHED",
|
||||
"RELEASING",
|
||||
"NOT_YET_RELEASED",
|
||||
"CANCELLED"
|
||||
)
|
||||
|
||||
val mangaStatus = listOf(
|
||||
"FINISHED",
|
||||
"RELEASING",
|
||||
"NOT_YET_RELEASED",
|
||||
@@ -57,11 +64,11 @@ object Anilist {
|
||||
"WINTER", "SPRING", "SUMMER", "FALL"
|
||||
)
|
||||
|
||||
val anime_formats = listOf(
|
||||
val animeFormats = listOf(
|
||||
"TV", "TV SHORT", "MOVIE", "SPECIAL", "OVA", "ONA", "MUSIC"
|
||||
)
|
||||
|
||||
val manga_formats = listOf(
|
||||
val mangaFormats = listOf(
|
||||
"MANGA", "NOVEL", "ONE SHOT"
|
||||
)
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ class SearchActivity : AppCompatActivity() {
|
||||
override fun run() {
|
||||
scope.launch(Dispatchers.IO) {
|
||||
loading = true
|
||||
model.loadSearch(result.copy(status = result.status))
|
||||
model.loadSearch(result)
|
||||
loading = false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ class SearchFilterBottomDialog : BottomSheetDialogFragment() {
|
||||
ArrayAdapter(
|
||||
binding.root.context,
|
||||
R.layout.item_dropdown,
|
||||
Anilist.status.toTypedArray()
|
||||
(if (activity.result.type == "ANIME") Anilist.animeStatus else Anilist.mangaStatus).toTypedArray()
|
||||
)
|
||||
)
|
||||
|
||||
@@ -253,7 +253,7 @@ class SearchFilterBottomDialog : BottomSheetDialogFragment() {
|
||||
ArrayAdapter(
|
||||
binding.root.context,
|
||||
R.layout.item_dropdown,
|
||||
(if (activity.result.type == "ANIME") Anilist.anime_formats else Anilist.manga_formats).toTypedArray()
|
||||
(if (activity.result.type == "ANIME") Anilist.animeFormats else Anilist.mangaFormats).toTypedArray()
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user