Skip to content

Commit

Permalink
fix: Make transfer lists stop only at the very edge of the lazy column
Browse files Browse the repository at this point in the history
  • Loading branch information
LunarX committed Dec 18, 2024
1 parent 63f87c3 commit c76e099
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -44,6 +46,7 @@ fun TransferItemList(
getTransfers: () -> List<TransferUi>,
onSwiped: (String) -> Unit,
onClick: (TransferUi) -> Unit,
contentPadding: PaddingValues = PaddingValues(),
) {

val selectedTransferUuid = getSelectedTransferUuid()
Expand All @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand All @@ -57,7 +57,8 @@ fun TransfersListWithExpiredBottomSheet(
} else {
navigateToDetails(transfer.uuid)
}
}
},
contentPadding = PaddingValues(Margin.Medium),
)

TransferExpiredBottomSheet(
Expand Down

0 comments on commit c76e099

Please sign in to comment.