mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-20 18:53:56 +00:00
fix: added searchStatus and searchYear back to manga filter
This commit is contained in:
@@ -245,7 +245,7 @@ class SearchFilterBottomDialog : BottomSheetDialogFragment() {
|
||||
binding.searchFilterCancel.setOnClickListener {
|
||||
dismiss()
|
||||
}
|
||||
val format =(if (activity.result.type == "ANIME") Anilist.animeStatus else Anilist.mangaStatus)
|
||||
val format = if (activity.result.type == "ANIME") Anilist.animeStatus else Anilist.mangaStatus
|
||||
binding.searchStatus.setText(activity.result.status?.replace("_", " "))
|
||||
binding.searchStatus.setAdapter(
|
||||
ArrayAdapter(
|
||||
@@ -273,7 +273,17 @@ class SearchFilterBottomDialog : BottomSheetDialogFragment() {
|
||||
)
|
||||
)
|
||||
|
||||
if (activity.result.type == "MANGA") binding.searchSeasonYearCont.visibility = GONE
|
||||
binding.searchYear.setText(activity.result.seasonYear?.toString())
|
||||
binding.searchYear.setAdapter(
|
||||
ArrayAdapter(
|
||||
binding.root.context,
|
||||
R.layout.item_dropdown,
|
||||
(1970 until Calendar.getInstance().get(Calendar.YEAR) + 2).map { it.toString() }
|
||||
.reversed().toTypedArray()
|
||||
)
|
||||
)
|
||||
|
||||
if (activity.result.type == "MANGA") binding.searchSeasonCont.visibility = GONE
|
||||
else {
|
||||
binding.searchSeason.setText(activity.result.season)
|
||||
binding.searchSeason.setAdapter(
|
||||
@@ -283,16 +293,6 @@ class SearchFilterBottomDialog : BottomSheetDialogFragment() {
|
||||
Anilist.seasons.toTypedArray()
|
||||
)
|
||||
)
|
||||
|
||||
binding.searchYear.setText(activity.result.seasonYear?.toString())
|
||||
binding.searchYear.setAdapter(
|
||||
ArrayAdapter(
|
||||
binding.root.context,
|
||||
R.layout.item_dropdown,
|
||||
(1970 until Calendar.getInstance().get(Calendar.YEAR) + 2).map { it.toString() }
|
||||
.reversed().toTypedArray()
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
binding.searchFilterGenres.adapter = FilterChipAdapter(Anilist.genres ?: listOf()) { chip ->
|
||||
|
||||
@@ -143,7 +143,6 @@
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/searchSeasonYearCont"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="8dp"
|
||||
@@ -184,6 +183,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||
android:id="@+id/searchSeasonCont"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="8dp"
|
||||
|
||||
Reference in New Issue
Block a user