Skip to content

Commit

Permalink
Merge pull request #242 from ooni/fix-inset-descriptor-update
Browse files Browse the repository at this point in the history
Fix inset in Descriptor screen update
  • Loading branch information
sdsantos authored Nov 5, 2024
2 parents 9898b34 + 3a1576e commit fd1862a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {},
) {
Expand All @@ -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) {
Expand Down

0 comments on commit fd1862a

Please sign in to comment.