mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-02-14 19:00:54 +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)
|
refreshCalDAVCalendar(event)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun insertEventRepeatException(event: Event, occurrenceTS: Long): Long {
|
fun insertEventRepeatException(event: Event, occurrenceTS: Long) {
|
||||||
val uri = CalendarContract.Events.CONTENT_URI
|
val uri = CalendarContract.Events.CONTENT_URI
|
||||||
val values = fillEventRepeatExceptionValues(event, occurrenceTS)
|
val values = fillEventRepeatExceptionValues(event, occurrenceTS)
|
||||||
val newUri = context.contentResolver.insert(uri, values)
|
try {
|
||||||
refreshCalDAVCalendar(event)
|
context.contentResolver.insert(uri, values)
|
||||||
return java.lang.Long.parseLong(newUri.lastPathSegment)
|
refreshCalDAVCalendar(event)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
context.showErrorToast(e)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun fillEventRepeatExceptionValues(event: Event, occurrenceTS: Long): ContentValues {
|
private fun fillEventRepeatExceptionValues(event: Event, occurrenceTS: Long): ContentValues {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user