diff options
author | Patrick Lang <72232737+patrickunterwegs@users.noreply.github.com> | 2022-01-24 00:22:27 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-24 00:22:27 +0300 |
commit | d7ef7a2acf2de831b819f409379df0f12efd572a (patch) | |
tree | d8a21eb7252cbb7b5a616367f0af71039efc3556 | |
parent | dda944d8f4e455fa03bda1689f06c557f0ece493 (diff) |
Fixes handling when ics contains a VALARM (entries are not ignored anymore as VALARM will not be considered as another JtxICalObject. (#5)
-rw-r--r-- | src/main/java/at/bitfire/ical4android/JtxICalObject.kt | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/at/bitfire/ical4android/JtxICalObject.kt b/src/main/java/at/bitfire/ical4android/JtxICalObject.kt index 1b8a5f1..a71fbdb 100644 --- a/src/main/java/at/bitfire/ical4android/JtxICalObject.kt +++ b/src/main/java/at/bitfire/ical4android/JtxICalObject.kt @@ -10,7 +10,6 @@ import android.net.ParseException import android.net.Uri import android.os.ParcelFileDescriptor import android.util.Base64 -import android.util.Log import at.bitfire.ical4android.MiscUtils.CursorHelper.toValues import at.techbee.jtx.JtxContract import at.techbee.jtx.JtxContract.JtxICalObject.TZ_ALLDAY @@ -224,7 +223,6 @@ open class JtxICalObject( ical.components.forEach { component -> val iCalObject = JtxICalObject(collection) - when(component) { is VToDo -> { iCalObject.component = JtxContract.JtxICalObject.Component.VTODO.name @@ -232,6 +230,7 @@ open class JtxICalObject( iCalObject.uid = component.uid.value // generated UID is overwritten here (if present) extractProperties(iCalObject, component.properties) extractVAlarms(iCalObject, component.components) // accessing the components needs an explicit type + iCalObjectList.add(iCalObject) } is VJournal -> { iCalObject.component = JtxContract.JtxICalObject.Component.VJOURNAL.name @@ -239,9 +238,9 @@ open class JtxICalObject( iCalObject.uid = component.uid.value extractProperties(iCalObject, component.properties) extractVAlarms(iCalObject, component.components) // accessing the components needs an explicit type + iCalObjectList.add(iCalObject) } } - iCalObjectList.add(iCalObject) } return iCalObjectList } |