improve the UX at creating events at the weekly view before midnight

This commit is contained in:
tibbi 2020-03-24 12:53:16 +01:00
parent b3e87e8cda
commit 076f754915
1 changed files with 6 additions and 1 deletions

View File

@ -411,7 +411,12 @@ class EventActivity : SimpleActivity() {
mEventStartDateTime = dateTime mEventStartDateTime = dateTime
val addMinutes = if (intent.getBooleanExtra(NEW_EVENT_SET_HOUR_DURATION, false)) { val addMinutes = if (intent.getBooleanExtra(NEW_EVENT_SET_HOUR_DURATION, false)) {
// if an event is created at 23:00 on the weekly view, make it end on 23:59 by default to avoid spanning across multiple days
if (mEventStartDateTime.hourOfDay == 23) {
59
} else {
60 60
}
} else { } else {
config.defaultDuration config.defaultDuration
} }