From c76e0997602f5f23f994fcbd6938151a0d0558c7 Mon Sep 17 00:00:00 2001 From: Gibran Chevalley Date: Wed, 18 Dec 2024 16:40:41 +0100 Subject: [PATCH] fix: Make transfer lists stop only at the very edge of the lazy column --- .../ui/components/transfer/TransferItemList.kt | 11 ++++++++--- .../transfer/TransfersListWithExpiredBottomSheet.kt | 5 +++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/transfer/TransferItemList.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/transfer/TransferItemList.kt index 6cec38fc2..e2c1076ae 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/transfer/TransferItemList.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/transfer/TransferItemList.kt @@ -19,6 +19,8 @@ package com.infomaniak.swisstransfer.ui.components.transfer import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.height import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.material3.Surface import androidx.compose.material3.Text @@ -44,6 +46,7 @@ fun TransferItemList( getTransfers: () -> List, onSwiped: (String) -> Unit, onClick: (TransferUi) -> Unit, + contentPadding: PaddingValues = PaddingValues(), ) { val selectedTransferUuid = getSelectedTransferUuid() @@ -56,10 +59,12 @@ fun TransferItemList( LazyColumn( modifier = modifier, verticalArrangement = Arrangement.spacedBy(Margin.Medium), - contentPadding = PaddingValues(top = Margin.Mini), + contentPadding = contentPadding, ) { - - item { Text(text = stringResource(titleRes), style = SwissTransferTheme.typography.h1) } + item { + Spacer(Modifier.height(Margin.Mini)) + Text(text = stringResource(titleRes), style = SwissTransferTheme.typography.h1) + } items( count = getTransfers().count(), diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/transfer/TransfersListWithExpiredBottomSheet.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/transfer/TransfersListWithExpiredBottomSheet.kt index 0343d2145..43e6df7da 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/transfer/TransfersListWithExpiredBottomSheet.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/transfer/TransfersListWithExpiredBottomSheet.kt @@ -17,6 +17,7 @@ */ package com.infomaniak.swisstransfer.ui.components.transfer +import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.padding import androidx.compose.material3.Surface import androidx.compose.runtime.Composable @@ -46,7 +47,6 @@ fun TransfersListWithExpiredBottomSheet( var expiredTransfer: TransferUi? by rememberSaveable { mutableStateOf(null) } TransferItemList( - modifier = Modifier.padding(Margin.Medium), direction = direction, getSelectedTransferUuid = getSelectedTransferUuid, getTransfers = getTransfers, @@ -57,7 +57,8 @@ fun TransfersListWithExpiredBottomSheet( } else { navigateToDetails(transfer.uuid) } - } + }, + contentPadding = PaddingValues(Margin.Medium), ) TransferExpiredBottomSheet(