create a local variable for caldav calendars at sync

This commit is contained in:
tibbi 2018-05-04 15:42:43 +02:00
parent a350396ece
commit f68dfdc4a5
1 changed files with 2 additions and 1 deletions

View File

@ -22,7 +22,8 @@ import kotlin.collections.ArrayList
class CalDAVHandler(val context: Context) {
fun refreshCalendars(activity: SimpleActivity? = null, callback: () -> Unit) {
for (calendar in getCalDAVCalendars(activity, context.config.caldavSyncedCalendarIDs)) {
val calDAVCalendars = getCalDAVCalendars(activity, context.config.caldavSyncedCalendarIDs)
for (calendar in calDAVCalendars) {
val localEventType = context.dbHelper.getEventTypeWithCalDAVCalendarId(calendar.id) ?: continue
localEventType.apply {
title = calendar.displayName