From 949105dce9acb938f1e612c0839fab1e3fd5968b Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 11 Mar 2019 23:46:23 +0100 Subject: [PATCH] update all-day switch at editing events instantly, without animation --- .../calendar/pro/activities/EventActivity.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 8d70f9b56..6819fe06d 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 @@ -25,6 +25,7 @@ import com.simplemobiletools.commons.helpers.* import com.simplemobiletools.commons.models.RadioItem import com.simplemobiletools.commons.views.MyTextView import kotlinx.android.synthetic.main.activity_event.* +import kotlinx.android.synthetic.main.activity_event.view.* import org.joda.time.DateTime import java.util.* import java.util.regex.Pattern @@ -172,9 +173,9 @@ class EventActivity : SimpleActivity() { } event_type_holder.setOnClickListener { showEventTypeDialog() } - - if (mEvent.flags and FLAG_ALL_DAY != 0) { - event_all_day.toggle() + event_all_day.apply { + isChecked = mEvent.flags and FLAG_ALL_DAY != 0 + jumpDrawablesToCurrentState() } updateTextColors(event_scrollview)