check if the latest used calendar id is still valid

This commit is contained in:
tibbi 2017-10-08 19:15:34 +02:00
parent 0c1c752260
commit 495f8c56b1
1 changed files with 3 additions and 1 deletions

View File

@ -136,7 +136,9 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
val addHours = if (intent.getBooleanExtra(NEW_EVENT_SET_HOUR_DURATION, false)) 1 else 0
mEventEndDateTime = mEventStartDateTime.plusHours(addHours)
mEventCalendarId = config.lastUsedCaldavCalendar
val isLastCaldavCalendarOK = config.caldavSync && config.getSyncedCalendarIdsAsList().contains(config.lastUsedCaldavCalendar.toString())
mEventCalendarId = if (isLastCaldavCalendarOK) config.lastUsedCaldavCalendar else STORED_LOCALLY_ONLY
}
private fun showReminder1Dialog() {