use proper event type id at caldav events

This commit is contained in:
tibbi 2017-08-27 23:52:31 +02:00
parent 49ec9a59f5
commit 04b0bbbc96
3 changed files with 2 additions and 6 deletions

View File

@ -1,9 +1,6 @@
# Joda
-dontwarn org.joda.time.**
-keep class com.google.common.**
-dontwarn com.google.common.**
-renamesourcefileattribute SourceFile
-keepattributes SourceFile, LineNumberTable, Signature, RuntimeVisibleAnnotations,AnnotationDefault

View File

@ -33,8 +33,7 @@ class CalDAVHandler(val context: Context) {
dbHelper.updateLocalEventType(this)
}
val eventTypeId = dbHelper.getEventTypeIdWithTitle(it.getFullTitle())
CalDAVHandler(context).fetchCalDAVCalendarEvents(it.id, eventTypeId)
CalDAVHandler(context).fetchCalDAVCalendarEvents(it.id, localEventType!!.id)
}
context.scheduleCalDAVSync(true)
callback()

View File

@ -758,7 +758,7 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
private fun fillEvents(cursor: Cursor?): List<Event> {
val eventTypeColors = SparseIntArray()
val eventTypes = fetchEventTypes().forEach {
fetchEventTypes().forEach {
eventTypeColors.put(it.id, it.color)
}