From 0fc9747157e8c76306341fd36988d1e578dd400f Mon Sep 17 00:00:00 2001 From: kouroshydn Date: Wed, 17 Apr 2019 04:22:39 +0430 Subject: [PATCH] fixes #860: whole day event do not ignore time --- .../calendar/pro/activities/EventActivity.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt index 3ff960284..edd304b81 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/EventActivity.kt @@ -802,10 +802,19 @@ class EventActivity : SimpleActivity() { } } + private fun resetTime() { + mEventStartDateTime = mEventStartDateTime.hourOfDay().setCopy(0).minuteOfDay().setCopy(0) + mEventEndDateTime = mEventEndDateTime.hourOfDay().setCopy(0).minuteOfDay().setCopy(0) + updateStartTimeText() + updateEndTimeText() + checkStartEndValidity() + } + private fun toggleAllDay(isChecked: Boolean) { hideKeyboard() event_start_time.beGoneIf(isChecked) event_end_time.beGoneIf(isChecked) + resetTime() } private fun shareEvent() {