Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Make transfer lists stop only at the very edge of the lazy column #271

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading