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

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

Fixed missing contact field in jtx sync (#91)

parent 92e3abfc
Loading
Loading
Loading
Loading
+202 −197
Original line number Diff line number Diff line
@@ -323,6 +323,7 @@ open class JtxICalObject(
                    is Description -> iCalObject.description = prop.value
                    is Color -> iCalObject.color = Css3Color.fromString(prop.value)?.argb
                    is Url -> iCalObject.url = prop.value
                    is Contact -> iCalObject.contact = prop.value
                    is Priority -> iCalObject.priority = prop.level
                    is Clazz -> iCalObject.classification = prop.value
                    is Status -> iCalObject.status = prop.value
@@ -700,6 +701,7 @@ open class JtxICalObject(
                Ical4Android.log.log(Level.WARNING, "Ignoring invalid task URL: $url", e)
            }
        }
        contact?.let {  props += Contact(it) }

        classification?.let { props += Clazz(it) }
        status?.let { props += Status(it) }
@@ -1390,6 +1392,7 @@ duration?.let(props::add)
        this.priority = newData.priority
        this.color = newData.color
        this.url = newData.url
        this.contact = newData.contact

        this.dtstart = newData.dtstart
        this.dtstartTimezone = newData.dtstartTimezone
@@ -1435,6 +1438,7 @@ duration?.let(props::add)
        values.getAsString(JtxContract.JtxICalObject.STATUS)?.let { status -> this.status = status }
        values.getAsString(JtxContract.JtxICalObject.CLASSIFICATION)?.let { classification -> this.classification = classification }
        values.getAsString(JtxContract.JtxICalObject.URL)?.let { url -> this.url = url }
        values.getAsString(JtxContract.JtxICalObject.CONTACT)?.let { contact -> this.contact = contact }
        values.getAsDouble(JtxContract.JtxICalObject.GEO_LAT)?.let { geoLat -> this.geoLat = geoLat }
        values.getAsDouble(JtxContract.JtxICalObject.GEO_LONG)?.let { geoLong -> this.geoLong = geoLong }
        values.getAsString(JtxContract.JtxICalObject.LOCATION)?.let { location -> this.location = location }
@@ -1623,6 +1627,7 @@ duration?.let(props::add)
        put(JtxContract.JtxICalObject.UID, uid)
        put(JtxContract.JtxICalObject.COLOR, color)
        put(JtxContract.JtxICalObject.URL, url)
        put(JtxContract.JtxICalObject.CONTACT, contact)
        put(JtxContract.JtxICalObject.GEO_LAT, geoLat)
        put(JtxContract.JtxICalObject.GEO_LONG, geoLong)
        put(JtxContract.JtxICalObject.LOCATION, location)