Skip to content

Commit

Permalink
feat: made year filter dynamic (#159)
Browse files Browse the repository at this point in the history
* feat: made year filter dynamic
  • Loading branch information
Adolar0042 authored Jan 25, 2024
1 parent 29c6863 commit 3fdec07
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import ani.dantotsu.connections.anilist.Anilist
import ani.dantotsu.databinding.BottomSheetSearchFilterBinding
import ani.dantotsu.databinding.ItemChipBinding
import com.google.android.material.chip.Chip
import java.util.*

class SearchFilterBottomDialog : BottomSheetDialogFragment() {
private var _binding: BottomSheetSearchFilterBinding? = null
Expand Down Expand Up @@ -103,7 +104,7 @@ class SearchFilterBottomDialog : BottomSheetDialogFragment() {
ArrayAdapter(
binding.root.context,
R.layout.item_dropdown,
(1970 until 2025).map { it.toString() }.reversed().toTypedArray()
(1970 until Calendar.getInstance().get(Calendar.YEAR) + 2).map { it.toString() }.reversed().toTypedArray()
)
)
}
Expand Down

0 comments on commit 3fdec07

Please sign in to comment.