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