File tree Expand file tree Collapse file tree
library/src/main/java/com/nextcloud/android/lib/resources/clientintegration Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,23 +42,20 @@ class ElementTypeAdapter :
4242 val typeName = jsonObject.get(" element" ).asString
4343
4444 try {
45+ val prefix = " com.nextcloud.android.lib.resources.clientintegration"
4546 val cls: Class <out Element > =
4647 when (typeName) {
47- " Button" ->
48- Class .forName(" com.nextcloud.android.lib.resources.clientintegration.Button" )
49- as Class <out Element >
48+ " LayoutButton" ->
49+ Class .forName(" $prefix .LayoutButton" ) as Class <out Element >
5050
51- " Text" ->
52- Class .forName(" com.nextcloud.android.lib.resources.clientintegration.Text" )
53- as Class <out Element >
51+ " LayoutText" ->
52+ Class .forName(" $prefix .LayoutText" ) as Class <out Element >
5453
55- " Image" ->
56- Class .forName(" com.nextcloud.android.lib.resources.clientintegration.Image" )
57- as Class <out Element >
54+ " LayoutImage" ->
55+ Class .forName(" $prefix .LayoutImage" ) as Class <out Element >
5856
59- " URL" ->
60- Class .forName(" com.nextcloud.android.lib.resources.clientintegration.URL" )
61- as Class <out Element >
57+ " LayoutURL" ->
58+ Class .forName(" $prefix .LayoutURL" ) as Class <out Element >
6259
6360 else -> return null
6461 }
Original file line number Diff line number Diff line change @@ -16,5 +16,5 @@ import kotlinx.parcelize.Parcelize
1616data class Layout (
1717 @SerializedName(" orientation" )
1818 var orientation : LayoutOrientation ,
19- var layoutRows : List <LayoutRow >
19+ var rows : List <LayoutRow >
2020) : Parcelable
Original file line number Diff line number Diff line change 1+ /*
2+ * Nextcloud Android Library
3+ *
4+ * SPDX-FileCopyrightText: 2025 Alper Ozturk <alper.ozturk@nextcloud.com>
5+ * SPDX-License-Identifier: MIT
6+ */
7+
8+ package com.nextcloud.android.lib.resources.clientintegration
9+
10+ import android.os.Parcelable
11+ import kotlinx.parcelize.Parcelize
12+
13+ @Parcelize
14+ data class Image (
15+ val url : String
16+ ) : Element,
17+ Parcelable
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import android.os.Parcelable
1212import kotlinx.parcelize.Parcelize
1313
1414@Parcelize
15- data class URL (
15+ data class LayoutURL (
1616 val text : String ,
1717 val url : String
1818) : Element,
You can’t perform that action at this time.
0 commit comments