From 61d246985dee33e99e2853a28ed16ec2c3a62540 Mon Sep 17 00:00:00 2001 From: Naveen Date: Wed, 3 Aug 2022 23:33:56 +0530 Subject: [PATCH] Notify user when an error occurs https://github.com/SimpleMobileTools/Simple-Calendar/issues/1601 --- .../com/simplemobiletools/calendar/pro/helpers/CalDAVHelper.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/CalDAVHelper.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/CalDAVHelper.kt index 5b959d86e..c781e0863 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/CalDAVHelper.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/CalDAVHelper.kt @@ -152,7 +152,8 @@ class CalDAVHelper(val context: Context) { val existingEvents = try { context.eventsDB.getEventsFromCalDAVCalendar("$CALDAV-$calendarId") } catch (e: Exception) { - ArrayList() + context.showErrorToast(context.getString(R.string.unknown_error_occurred)) + return } existingEvents.forEach {