diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/CalDAVHandler.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/CalDAVHandler.kt index 0f5a66605..c7cbc03d2 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/CalDAVHandler.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/CalDAVHandler.kt @@ -49,6 +49,7 @@ class CalDAVHandler(val context: Context) { CalendarContract.Calendars._ID, CalendarContract.Calendars.CALENDAR_DISPLAY_NAME, CalendarContract.Calendars.ACCOUNT_NAME, + CalendarContract.Calendars.ACCOUNT_TYPE, CalendarContract.Calendars.OWNER_ACCOUNT, CalendarContract.Calendars.CALENDAR_COLOR, CalendarContract.Calendars.CALENDAR_ACCESS_LEVEL) @@ -62,10 +63,11 @@ class CalDAVHandler(val context: Context) { val id = cursor.getIntValue(CalendarContract.Calendars._ID) val displayName = cursor.getStringValue(CalendarContract.Calendars.CALENDAR_DISPLAY_NAME) val accountName = cursor.getStringValue(CalendarContract.Calendars.ACCOUNT_NAME) + val accountType = cursor.getStringValue(CalendarContract.Calendars.ACCOUNT_TYPE) val ownerName = cursor.getStringValue(CalendarContract.Calendars.OWNER_ACCOUNT) val color = cursor.getIntValue(CalendarContract.Calendars.CALENDAR_COLOR) val accessLevel = cursor.getIntValue(CalendarContract.Calendars.CALENDAR_ACCESS_LEVEL) - val calendar = CalDAVCalendar(id, displayName, accountName, ownerName, color, accessLevel) + val calendar = CalDAVCalendar(id, displayName, accountName, accountType, ownerName, color, accessLevel) calendars.add(calendar) } while (cursor.moveToNext()) } diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/models/CalDAVCalendar.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/models/CalDAVCalendar.kt index f0258bb13..b1f13316a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/models/CalDAVCalendar.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/models/CalDAVCalendar.kt @@ -1,6 +1,7 @@ package com.simplemobiletools.calendar.models -data class CalDAVCalendar(val id: Int, val displayName: String, val accountName: String, val ownerName: String, val color: Int, val accessLevel: Int) { +data class CalDAVCalendar(val id: Int, val displayName: String, val accountName: String, val accountType: String, val ownerName: String, + val color: Int, val accessLevel: Int) { fun canWrite() = accessLevel >= 500 fun getFullTitle() = "$displayName ($accountName)"