mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
adding some crashfixes
This commit is contained in:
@@ -25,7 +25,7 @@ class ManageEventTypesActivity : SimpleActivity(), DeleteEventTypesListener {
|
||||
}
|
||||
|
||||
private fun showEventTypeDialog(eventType: EventType? = null) {
|
||||
UpdateEventTypeDialog(this, eventType!!.copy()) {
|
||||
UpdateEventTypeDialog(this, eventType?.copy()) {
|
||||
getEventTypes()
|
||||
}
|
||||
}
|
||||
|
@@ -104,7 +104,7 @@ data class Event(var id: Int = 0, var startTS: Int = 0, var endTS: Int = 0, var
|
||||
}
|
||||
}
|
||||
|
||||
fun getCalDAVEventId() = (importId.split("-").lastOrNull() ?: "0").toString().toLong()
|
||||
fun getCalDAVEventId() = if (importId.contains("-")) (importId.split("-").lastOrNull() ?: "0").toString().toLong() else 0L
|
||||
|
||||
fun getCalDAVCalendarId() = (source.split("-").lastOrNull() ?: "0").toString().toInt()
|
||||
fun getCalDAVCalendarId() = if (source.contains("-")) (source.split("-").lastOrNull() ?: "0").toString().toInt() else 0
|
||||
}
|
||||
|
Reference in New Issue
Block a user