handle caldav events without a title too

This commit is contained in:
tibbi 2018-01-10 17:04:55 +01:00
parent b94dbe9f27
commit e44623f229
1 changed files with 1 additions and 1 deletions

View File

@ -219,7 +219,7 @@ class CalDAVHandler(val context: Context) {
if (cursor != null && cursor.moveToFirst()) { if (cursor != null && cursor.moveToFirst()) {
do { do {
val id = cursor.getLongValue(CalendarContract.Events._ID) val id = cursor.getLongValue(CalendarContract.Events._ID)
val title = cursor.getStringValue(CalendarContract.Events.TITLE) ?: continue val title = cursor.getStringValue(CalendarContract.Events.TITLE) ?: ""
val description = cursor.getStringValue(CalendarContract.Events.DESCRIPTION) ?: "" val description = cursor.getStringValue(CalendarContract.Events.DESCRIPTION) ?: ""
val startTS = (cursor.getLongValue(CalendarContract.Events.DTSTART) / 1000).toInt() val startTS = (cursor.getLongValue(CalendarContract.Events.DTSTART) / 1000).toInt()
var endTS = (cursor.getLongValue(CalendarContract.Events.DTEND) / 1000).toInt() var endTS = (cursor.getLongValue(CalendarContract.Events.DTEND) / 1000).toInt()