mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
update the weekly repetition day if its a single day and start date changes
This commit is contained in:
@@ -469,6 +469,7 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
|
|||||||
updateEndDateText()
|
updateEndDateText()
|
||||||
updateEndTimeText()
|
updateEndTimeText()
|
||||||
}
|
}
|
||||||
|
checkWeeklyRepeatRule()
|
||||||
} else {
|
} else {
|
||||||
mEventEndDateTime = mEventEndDateTime.withDate(year, month + 1, day)
|
mEventEndDateTime = mEventEndDateTime.withDate(year, month + 1, day)
|
||||||
updateEndDateText()
|
updateEndDateText()
|
||||||
@@ -491,6 +492,15 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun checkWeeklyRepeatRule() {
|
||||||
|
if (isXWeeklyRepetition()) {
|
||||||
|
val day = mRepeatRule
|
||||||
|
if (day == MONDAY || day == TUESDAY || day == WEDNESDAY || day == THURSDAY || day == FRIDAY || day == SATURDAY || day == SUNDAY) {
|
||||||
|
setRepeatRule(Math.pow(2.0, (mEventStartDateTime.dayOfWeek - 1).toDouble()).toInt())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun updateIconColors() {
|
private fun updateIconColors() {
|
||||||
event_time_image.setColorFilter(config.textColor, PorterDuff.Mode.SRC_IN)
|
event_time_image.setColorFilter(config.textColor, PorterDuff.Mode.SRC_IN)
|
||||||
event_repetition_image.setColorFilter(config.textColor, PorterDuff.Mode.SRC_IN)
|
event_repetition_image.setColorFilter(config.textColor, PorterDuff.Mode.SRC_IN)
|
||||||
|
Reference in New Issue
Block a user