mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-02-12 18:01:07 +01:00
fixing a crash related to inserting CalDAV event repetition exceptions
This commit is contained in:
parent
0fe2c4a59d
commit
2622007164
@ -452,12 +452,15 @@ class CalDAVHelper(val context: Context) {
|
||||
refreshCalDAVCalendar(event)
|
||||
}
|
||||
|
||||
fun insertEventRepeatException(event: Event, occurrenceTS: Long): Long {
|
||||
fun insertEventRepeatException(event: Event, occurrenceTS: Long) {
|
||||
val uri = CalendarContract.Events.CONTENT_URI
|
||||
val values = fillEventRepeatExceptionValues(event, occurrenceTS)
|
||||
val newUri = context.contentResolver.insert(uri, values)
|
||||
refreshCalDAVCalendar(event)
|
||||
return java.lang.Long.parseLong(newUri.lastPathSegment)
|
||||
try {
|
||||
context.contentResolver.insert(uri, values)
|
||||
refreshCalDAVCalendar(event)
|
||||
} catch (e: Exception) {
|
||||
context.showErrorToast(e)
|
||||
}
|
||||
}
|
||||
|
||||
private fun fillEventRepeatExceptionValues(event: Event, occurrenceTS: Long): ContentValues {
|
||||
|
Loading…
x
Reference in New Issue
Block a user