Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit d7ef7a2a authored by Patrick Lang's avatar Patrick Lang Committed by GitHub
Browse files

Fixes handling when ics contains a VALARM (entries are not ignored anymore as...

Fixes handling when ics contains a VALARM (entries are not ignored anymore as VALARM will not be considered as another JtxICalObject. (#5)
parent dda944d8
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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
        }