From 3a1576e9e3be5ae72fd0a81a03e6ed01f5a6c342 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Santos?= Date: Mon, 4 Nov 2024 12:39:58 +0000 Subject: [PATCH] Fix inset in Descriptor screen update --- .../probe/ui/descriptor/DescriptorScreen.kt | 4 ++-- .../probe/ui/shared/UpdateProgressStatus.kt | 17 +++++++++-------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/descriptor/DescriptorScreen.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/descriptor/DescriptorScreen.kt index 440aa4ac..d1a883b6 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/descriptor/DescriptorScreen.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/descriptor/DescriptorScreen.kt @@ -173,8 +173,8 @@ fun DescriptorScreen( } if (state.isRefreshing) { UpdateProgressStatus( - modifier = Modifier.align(Alignment.BottomCenter) - .padding(WindowInsets.navigationBars.asPaddingValues()), + modifier = Modifier.align(Alignment.BottomCenter), + contentModifier = Modifier.padding(WindowInsets.navigationBars.asPaddingValues()), type = state.refreshType, ) } diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/shared/UpdateProgressStatus.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/shared/UpdateProgressStatus.kt index 1f48d0e0..4cc521a0 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/shared/UpdateProgressStatus.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/shared/UpdateProgressStatus.kt @@ -28,8 +28,9 @@ import org.ooni.probe.data.models.UpdateStatusType @Composable fun UpdateProgressStatus( - modifier: Modifier, type: UpdateStatusType, + modifier: Modifier = Modifier, + contentModifier: Modifier = Modifier, onReviewLinkClicked: () -> Unit = {}, onCancelClicked: () -> Unit = {}, ) { @@ -38,15 +39,15 @@ fun UpdateProgressStatus( modifier = modifier, ) { Row( - modifier = Modifier.fillMaxWidth() + modifier = contentModifier + .fillMaxWidth() .height(56.dp) .padding(horizontal = 16.dp, vertical = 8.dp), - horizontalArrangement = - if (type == UpdateStatusType.FetchingUpdates) { - Arrangement.spacedBy(10.dp) - } else { - Arrangement.SpaceBetween - }, + horizontalArrangement = if (type == UpdateStatusType.FetchingUpdates) { + Arrangement.spacedBy(10.dp) + } else { + Arrangement.SpaceBetween + }, verticalAlignment = Alignment.CenterVertically, ) { if (type == UpdateStatusType.FetchingUpdates) {