From 3fdec074c6cc283f78bb9a50792c47f96f8195d6 Mon Sep 17 00:00:00 2001 From: Adolar0042 <39769465+Adolar0042@users.noreply.github.com> Date: Thu, 25 Jan 2024 17:24:48 +0100 Subject: [PATCH] feat: made year filter dynamic (#159) * feat: made year filter dynamic --- .../main/java/ani/dantotsu/media/SearchFilterBottomDialog.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/ani/dantotsu/media/SearchFilterBottomDialog.kt b/app/src/main/java/ani/dantotsu/media/SearchFilterBottomDialog.kt index 79fd87126a..6134a616b3 100644 --- a/app/src/main/java/ani/dantotsu/media/SearchFilterBottomDialog.kt +++ b/app/src/main/java/ani/dantotsu/media/SearchFilterBottomDialog.kt @@ -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 @@ -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() ) ) }