mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-20 14:03:56 +00:00
fix(search): underscore
This commit is contained in:
@@ -48,14 +48,14 @@ object Anilist {
|
||||
val animeStatus = listOf(
|
||||
"FINISHED",
|
||||
"RELEASING",
|
||||
"NOT_YET_RELEASED",
|
||||
"NOT YET RELEASED",
|
||||
"CANCELLED"
|
||||
)
|
||||
|
||||
val mangaStatus = listOf(
|
||||
"FINISHED",
|
||||
"RELEASING",
|
||||
"NOT_YET_RELEASED",
|
||||
"NOT YET RELEASED",
|
||||
"HIATUS",
|
||||
"CANCELLED"
|
||||
)
|
||||
|
||||
@@ -333,7 +333,7 @@ class SearchAdapter(private val activity: SearchActivity, private val type: Stri
|
||||
override fun onBindViewHolder(holder: SearchChipViewHolder, position: Int) {
|
||||
val chip = chips[position]
|
||||
holder.binding.root.apply {
|
||||
text = chip.text
|
||||
text = chip.text.replace("_", " ")
|
||||
setOnClickListener {
|
||||
activity.result.removeChip(chip)
|
||||
update()
|
||||
|
||||
@@ -124,7 +124,7 @@ class SearchFilterBottomDialog : BottomSheetDialogFragment() {
|
||||
|
||||
CoroutineScope(Dispatchers.Main).launch {
|
||||
activity.result.apply {
|
||||
status = binding.searchStatus.text.toString().ifBlank { null }
|
||||
status = binding.searchStatus.text.toString().replace(" ", "_").ifBlank { null }
|
||||
format = binding.searchFormat.text.toString().ifBlank { null }
|
||||
season = binding.searchSeason.text.toString().ifBlank { null }
|
||||
seasonYear = binding.searchYear.text.toString().toIntOrNull()
|
||||
@@ -221,7 +221,7 @@ class SearchFilterBottomDialog : BottomSheetDialogFragment() {
|
||||
|
||||
binding.searchFilterApply.setOnClickListener {
|
||||
activity.result.apply {
|
||||
status = binding.searchStatus.text.toString().ifBlank { null }
|
||||
status = binding.searchStatus.text.toString().replace(" ", "_").ifBlank { null }
|
||||
format = binding.searchFormat.text.toString().ifBlank { null }
|
||||
season = binding.searchSeason.text.toString().ifBlank { null }
|
||||
seasonYear = binding.searchYear.text.toString().toIntOrNull()
|
||||
@@ -238,13 +238,13 @@ class SearchFilterBottomDialog : BottomSheetDialogFragment() {
|
||||
binding.searchFilterCancel.setOnClickListener {
|
||||
dismiss()
|
||||
}
|
||||
|
||||
val format =(if (activity.result.type == "ANIME") Anilist.animeStatus else Anilist.mangaStatus).toTypedArray()
|
||||
binding.searchStatus.setText(activity.result.status)
|
||||
binding.searchStatus.setAdapter(
|
||||
ArrayAdapter(
|
||||
binding.root.context,
|
||||
R.layout.item_dropdown,
|
||||
(if (activity.result.type == "ANIME") Anilist.animeStatus else Anilist.mangaStatus).toTypedArray()
|
||||
format
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user