catch another exception related to fetching event types
This commit is contained in:
parent
2622007164
commit
871d5f5c3d
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue