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

Commit e9a62edd authored by Ricki Hirner's avatar Ricki Hirner
Browse files

DAV:owner small rewrite

parent ced1ed9a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -309,8 +309,8 @@ class DavService: android.app.Service() {
                            info.serviceId = serviceId
                            info.homeSetId = homeSet.id
                            info.confirmed = true
                            Logger.log.log(Level.FINE, "Found collection", info)
                            info.owner = response[Owner::class.java]?.href
                            Logger.log.log(Level.FINE, "Found collection", info)

                            // remember usable collections
                            if ((service.type == Service.TYPE_CARDDAV && info.type == Collection.TYPE_ADDRESSBOOK) ||
+3 −10
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ import at.bitfire.dav4jvm.property.*
import at.bitfire.davdroid.DavUtils
import okhttp3.HttpUrl
import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
import org.apache.commons.lang3.StringUtils

@Entity(tableName = "collection",
        foreignKeys = [
@@ -88,16 +89,8 @@ data class Collection(
                privUnbind = privilegeSet.mayUnbind
            }

            var displayName: String? = null
            dav[DisplayName::class.java]?.let {
                if (!it.displayName.isNullOrEmpty())
                    displayName = it.displayName
            }

            var owner: String? = null
            dav[Owner::class.java]?.let {
                owner = it.href
            }
            val displayName = StringUtils.trimToNull(dav[DisplayName::class.java]?.displayName)
            val owner = dav[Owner::class.java]?.href

            var description: String? = null
            var color: Int? = null
Compare 047e48f9 to 0710fb57
Original line number Diff line number Diff line
Subproject commit 047e48f9b5dddbc726d36b3677c01d223b6ad2dd
Subproject commit 0710fb57c1e39b810d5fecfa8dd8cb90dbea48e3
Compare 10d04713 to 4d3d96fb
Original line number Diff line number Diff line
Subproject commit 10d04713b4ae041b725233c5e7cdfc707c108df2
Subproject commit 4d3d96fb2052a75a3af591cc39b19304ca2fd472