ignore caldav events without titles

This commit is contained in:
tibbi 2017-08-14 22:15:53 +02:00
parent 297db04f46
commit bded050f63
1 changed files with 1 additions and 1 deletions

View File

@ -286,7 +286,7 @@ fun Context.fetchCalDAVCalendarEvents(calendarID: Long, eventTypeId: Int) {
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) val title = cursor.getStringValue(CalendarContract.Events.TITLE) ?: continue
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()