mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-02-17 04:10:45 +01:00
remove some code repetition
This commit is contained in:
parent
98e1508a88
commit
1337340896
@ -138,14 +138,16 @@ class EventActivity : SimpleActivity(), DBHelper.EventsListener {
|
||||
}
|
||||
|
||||
private fun setupRepetition() {
|
||||
when (mEvent.repeatInterval) {
|
||||
DAY -> event_repetition.setSelection(1)
|
||||
WEEK -> event_repetition.setSelection(2)
|
||||
BIWEEK -> event_repetition.setSelection(3)
|
||||
MONTH -> event_repetition.setSelection(4)
|
||||
YEAR -> event_repetition.setSelection(5)
|
||||
else -> event_repetition.setSelection(0)
|
||||
}
|
||||
event_repetition.setSelection(
|
||||
when (mEvent.repeatInterval) {
|
||||
DAY -> 1
|
||||
WEEK -> 2
|
||||
BIWEEK -> 3
|
||||
MONTH -> 4
|
||||
YEAR -> 5
|
||||
else -> 0
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
private fun setupEndCheckbox() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user