Skip to content

Commit 394ad5b

Browse files
committed
handle lib
Signed-off-by: alperozturk <[email protected]>
1 parent 717c795 commit 394ad5b

File tree

4 files changed

+17
-8
lines changed

4 files changed

+17
-8
lines changed

app/src/main/java/com/nextcloud/ui/ClientIntegrationScreen.kt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import androidx.compose.foundation.lazy.LazyRow
1818
import androidx.compose.foundation.lazy.items
1919
import androidx.compose.material.icons.Icons
2020
import androidx.compose.material.icons.filled.Close
21+
import androidx.compose.material3.Button
2122
import androidx.compose.material3.Icon
2223
import androidx.compose.material3.IconButton
2324
import androidx.compose.material3.Scaffold
@@ -34,15 +35,15 @@ import com.nextcloud.android.lib.resources.clientintegration.LayoutButton
3435
import com.nextcloud.android.lib.resources.clientintegration.LayoutOrientation
3536
import com.nextcloud.android.lib.resources.clientintegration.LayoutRow
3637
import com.nextcloud.android.lib.resources.clientintegration.LayoutText
37-
import com.nextcloud.android.lib.resources.clientintegration.URL
38+
import com.nextcloud.android.lib.resources.clientintegration.LayoutURL
3839
import com.nextcloud.utils.extensions.getActivity
3940
import com.owncloud.android.lib.resources.status.OCCapability
4041
import com.owncloud.android.utils.DisplayUtils
4142

4243
@Composable
4344
fun ClientIntegrationScreen(clientIntegrationUI: ClientIntegrationUI, baseUrl: String) {
4445
val activity = LocalContext.current.getActivity()
45-
val layoutRows = clientIntegrationUI.root?.layoutRows ?: listOf()
46+
val layoutRows = clientIntegrationUI.root?.rows ?: listOf()
4647

4748
Scaffold(topBar = {
4849
Row(Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.End) {
@@ -84,11 +85,11 @@ fun ClientIntegrationScreen(clientIntegrationUI: ClientIntegrationUI, baseUrl: S
8485
@Composable
8586
private fun DisplayElement(element: Element, baseUrl: String, activity: Activity?) {
8687
when (element) {
87-
is LayoutButton -> androidx.compose.material3.Button(onClick = { }) {
88+
is LayoutButton -> Button(onClick = { }) {
8889
Text(element.label)
8990
}
9091

91-
is URL -> TextButton({
92+
is LayoutURL -> TextButton({
9293
openLink(activity, baseUrl, element.url)
9394
}) { Text(element.text) }
9495

@@ -117,7 +118,7 @@ private fun ClientIntegrationScreenPreviewVertical() {
117118
listOf(LayoutButton("Click2", "Primary"))
118119
),
119120
LayoutRow(
120-
listOf(URL("Analytics report created", "https://nextcloud.com"))
121+
listOf(LayoutURL("Analytics report created", "https://nextcloud.com"))
121122
)
122123
)
123124
)
@@ -144,7 +145,7 @@ private fun ClientIntegrationScreenPreviewHorizontal() {
144145
listOf(LayoutButton("Click2", "Primary"))
145146
),
146147
LayoutRow(
147-
listOf(URL("Analytics report created", "https://nextcloud.com"))
148+
listOf(LayoutURL("Analytics report created", "https://nextcloud.com"))
148149
)
149150
)
150151
)

app/src/main/java/com/nextcloud/ui/fileactions/ClientIntegration.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ class ClientIntegration(
171171
var output: ClientIntegrationUI?
172172
try {
173173
output = parseClientIntegrationResult(response)
174-
if (output.root != null && output.root?.layoutRows != null) {
174+
if (output.root != null && output.root?.rows != null) {
175175
startClientIntegration(endpoint, output)
176176
} else {
177177
val tooltipResponse = parseTooltipResult(response)

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
androidCommonLibraryVersion = "0.30.0"
66
androidGifDrawableVersion = "1.2.29"
77
androidImageCropperVersion = "4.7.0"
8-
androidLibraryVersion = "f51ba3bf5f"
8+
androidLibraryVersion = "16fc939b86"
99
androidPluginVersion = '8.13.2'
1010
androidsvgVersion = "1.4"
1111
androidxMediaVersion = "1.5.1"

gradle/verification-metadata.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18955,6 +18955,14 @@
1895518955
<sha256 value="5b3c99a253c3baca5ce3bf574c38869a675a7197f5afdff6937d09e808f0f43a" origin="Generated by Gradle" reason="Artifact is not signed"/>
1895618956
</artifact>
1895718957
</component>
18958+
<component group="com.github.nextcloud" name="android-library" version="16fc939b86">
18959+
<artifact name="android-library-16fc939b86.aar">
18960+
<sha256 value="e39a26fe850ce5c66b6d0bd3c087d751dd73a3d105518e8e08e41a2a4eb7dd1f" origin="Generated by Gradle" reason="Artifact is not signed"/>
18961+
</artifact>
18962+
<artifact name="android-library-16fc939b86.module">
18963+
<sha256 value="a29b76a1193b0eef2f1b0d921a863803ec96146abcc728d9d9978bc13c9b7fa1" origin="Generated by Gradle" reason="Artifact is not signed"/>
18964+
</artifact>
18965+
</component>
1895818966
<component group="com.github.nextcloud" name="android-library" version="18f01f7cdffa09bbddbcb610d222fb6df46dae47">
1895918967
<artifact name="android-library-18f01f7cdffa09bbddbcb610d222fb6df46dae47.aar">
1896018968
<sha256 value="c6c70775d49d935e7691f43fee0ff51c2c0df03c041fd75da92cf1f0df1385a7" origin="Generated by Gradle" reason="Artifact is not signed"/>

0 commit comments

Comments
 (0)