mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
simplifying a forloop
This commit is contained in:
@@ -168,9 +168,7 @@ class MainActivity : SimpleActivity(), EventListFragment.DeleteListener, ChangeV
|
|||||||
|
|
||||||
private fun getYears(targetYear: Int): List<Int> {
|
private fun getYears(targetYear: Int): List<Int> {
|
||||||
val years = ArrayList<Int>(PREFILLED_YEARS)
|
val years = ArrayList<Int>(PREFILLED_YEARS)
|
||||||
for (i in targetYear - PREFILLED_YEARS / 2..targetYear + PREFILLED_YEARS / 2)
|
years += targetYear - PREFILLED_YEARS / 2..targetYear + PREFILLED_YEARS / 2
|
||||||
years.add(i)
|
|
||||||
|
|
||||||
return years
|
return years
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user