be smarter at reseting time at all-day events
This commit is contained in:
parent
d4ceab64ca
commit
be4a7e0c31
1 changed files with 8 additions and 5 deletions
|
@ -803,12 +803,15 @@ class EventActivity : SimpleActivity() {
|
|||
}
|
||||
|
||||
private fun resetTime() {
|
||||
mEventStartDateTime = mEventStartDateTime.hourOfDay().setCopy(0).minuteOfDay().setCopy(0)
|
||||
mEventEndDateTime = mEventEndDateTime.hourOfDay().setCopy(0).minuteOfDay().setCopy(0)
|
||||
updateStartTimeText()
|
||||
if (mEventEndDateTime.isBefore(mEventStartDateTime) &&
|
||||
mEventStartDateTime.dayOfMonth() == mEventEndDateTime.dayOfMonth() &&
|
||||
mEventStartDateTime.monthOfYear() == mEventEndDateTime.monthOfYear()) {
|
||||
|
||||
mEventEndDateTime = mEventEndDateTime.withTime(mEventStartDateTime.hourOfDay, mEventStartDateTime.minuteOfHour, mEventStartDateTime.secondOfMinute, 0)
|
||||
updateEndTimeText()
|
||||
checkStartEndValidity()
|
||||
}
|
||||
}
|
||||
|
||||
private fun toggleAllDay(isChecked: Boolean) {
|
||||
hideKeyboard()
|
||||
|
|
Loading…
Reference in a new issue