diff options
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/fragments/SelectYearFragment.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SelectYearFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SelectYearFragment.java index 14237d22..ce1e5548 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SelectYearFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SelectYearFragment.java @@ -21,6 +21,7 @@ import android.view.MenuInflater; import android.view.MenuItem; import java.util.ArrayList; +import java.util.Calendar; import java.util.List; import github.daneren2005.dsub.R; @@ -53,7 +54,7 @@ public class SelectYearFragment extends SelectRecyclerFragment<String> { @Override public List<String> getObjects(MusicService musicService, boolean refresh, ProgressListener listener) throws Exception { List<String> decades = new ArrayList<>(); - for(int i = 2010; i >= 1800; i -= 10) { + for(int i = (int)(Math.ceil(Calendar.getInstance().get(Calendar.YEAR) / 10) * 10); i >= 1800; i -= 10) { decades.add(String.valueOf(i)); } |