catch another exception related to fetching event types

This commit is contained in:
tibbi 2019-04-03 19:50:21 +02:00
parent 2622007164
commit 871d5f5c3d
1 changed files with 6 additions and 1 deletions

View File

@ -15,7 +15,12 @@ class EventsHelper(val context: Context) {
fun getEventTypes(activity: Activity, showWritableOnly: Boolean, callback: (notes: ArrayList<EventType>) -> Unit) {
Thread {
var eventTypes = eventTypesDB.getEventTypes().toMutableList() as ArrayList<EventType>
var eventTypes = ArrayList<EventType>()
try {
eventTypes = eventTypesDB.getEventTypes().toMutableList() as ArrayList<EventType>
} catch (ignored: Exception) {
}
if (showWritableOnly) {
val caldavCalendars = activity.calDAVHelper.getCalDAVCalendars("", true)
eventTypes = eventTypes.filter {