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

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

suppress export of child relation (#21)

* suppress export of child relation

* Don't export X-COMPLETEDTIMEZONE:ALLDAY if no completed time was set
parent 00f63f5a
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -969,13 +969,15 @@ duration?.let(props::add)

        if(component == JtxContract.JtxICalObject.Component.VTODO.name) {
            completed?.let {
                //Completed is defines as always DateTime! And is always UTC!?

                //Completed is defines as always DateTime! And is always UTC! But the X_PROP_COMPLETEDTIMEZONE can still define a timezone
                props += Completed(DateTime(it))

                // only take completedTimezone if there was the completed time set
                completedTimezone?.let { complTZ ->
                    props += XProperty(X_PROP_COMPLETEDTIMEZONE, complTZ)
                }
            completedTimezone?.let {
                props += XProperty(X_PROP_COMPLETEDTIMEZONE, it)
            }

            percent?.let {
                props += PercentComplete(it)
            }
@@ -1683,8 +1685,8 @@ duration?.let(props::add)
        collection.client.query(
            relatedToUrl,
            null,
            "${JtxContract.JtxRelatedto.ICALOBJECT_ID} = ?",
            arrayOf(this.id.toString()),
            "${JtxContract.JtxRelatedto.ICALOBJECT_ID} = ? AND ${JtxContract.JtxRelatedto.RELTYPE} = ?",
            arrayOf(this.id.toString(), JtxContract.JtxRelatedto.Reltype.PARENT.name),
            null
        )?.use { cursor ->
            while (cursor.moveToNext()) {