fix a glitch at setting local event type

This commit is contained in:
tibbi 2018-05-02 11:49:36 +02:00
parent 47f5adf5f3
commit e3b4be65d3

View File

@ -60,7 +60,8 @@ class EventActivity : SimpleActivity() {
return
}
if (dbHelper.getEventType(config.lastUsedLocalEventTypeId) == null) {
val localEventType = dbHelper.getEventType(config.lastUsedLocalEventTypeId)
if (localEventType == null || localEventType.caldavCalendarId != 0) {
config.lastUsedLocalEventTypeId = DBHelper.REGULAR_EVENT_TYPE_ID
}