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

Commit 326267af authored by Ricki Hirner's avatar Ricki Hirner
Browse files

DAV:owner: resolve relative paths, only show in UI when it's set

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

                            // remember usable collections
+4 −2
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ data class Collection(

    var displayName: String? = null,
    var description: String? = null,
    var owner: String? = null,
    var owner: HttpUrl? = null,

    // CalDAV only
    var color: Int? = null,
@@ -90,7 +90,9 @@ data class Collection(
            }

            val displayName = StringUtils.trimToNull(dav[DisplayName::class.java]?.displayName)
            val owner = dav[Owner::class.java]?.href
            val owner = dav[Owner::class.java]?.href?.let { ownerHref ->
                dav.href.resolve(ownerHref)
            }

            var description: String? = null
            var color: Int? = null
+3 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
        <variable
            name="model"
            type="at.bitfire.davdroid.ui.account.CollectionInfoFragment.Model"/>
        <import type="android.view.View"/>
    </data>

    <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
@@ -57,6 +58,7 @@
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:layout_marginBottom="4dp"
                android:visibility="@{model.collection.owner != null ? View.VISIBLE : View.GONE}"
                android:text="@string/collection_properties_owner"
                android:labelFor="@id/owner" />

@@ -64,6 +66,7 @@
                android:id="@+id/owner"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:visibility="@{model.collection.owner != null ? View.VISIBLE : View.GONE}"
                android:fontFamily="monospace"
                android:textSize="12sp"
                android:textIsSelectable="true"