set repeating on the same day by default at choosing yearly repetition

This commit is contained in:
tibbi
2018-05-10 13:30:52 +02:00
parent 8958e43093
commit e33054be98

View File

@ -218,10 +218,10 @@ class EventActivity : SimpleActivity() {
updateRepetitionText()
checkRepeatTexts(interval)
if (mRepeatInterval.isXWeeklyRepetition()) {
setRepeatRule(Math.pow(2.0, (mEventStartDateTime.dayOfWeek - 1).toDouble()).toInt())
} else if (mRepeatInterval.isXMonthlyRepetition()) {
setRepeatRule(REPEAT_SAME_DAY)
when {
mRepeatInterval.isXWeeklyRepetition() -> setRepeatRule(Math.pow(2.0, (mEventStartDateTime.dayOfWeek - 1).toDouble()).toInt())
mRepeatInterval.isXMonthlyRepetition() -> setRepeatRule(REPEAT_SAME_DAY)
mRepeatInterval.isXYearlyRepetition() -> setRepeatRule(REPEAT_SAME_DAY)
}
}