diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/asynctasks/FetchGoogleEventsTask.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/asynctasks/FetchGoogleEventsTask.kt index 9b7d245af..16aed9801 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/asynctasks/FetchGoogleEventsTask.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/asynctasks/FetchGoogleEventsTask.kt @@ -98,7 +98,9 @@ class FetchGoogleEventsTask(val activity: Activity, credential: GoogleAccountCre } if (eventTypeId == -1) { - eventTypeId = dbHelper.insertEventType(EventType(0, eventType, activity.config.primaryColor)) + val newEventType = EventType(0, eventType, activity.config.primaryColor) + eventTypeId = dbHelper.insertEventType(newEventType) + eventTypes.add(newEventType) } if (start.date != null) {