Skip to content

Commit

Permalink
fix: Factorize all Transfers list paddings into same PaddingValues
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBoulongne committed Dec 20, 2024
1 parent 21316cc commit 4d4e02f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ 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 Down Expand Up @@ -61,10 +59,8 @@ fun TransferItemList(
verticalArrangement = Arrangement.spacedBy(Margin.Medium),
contentPadding = contentPadding,
) {
item {
Spacer(Modifier.height(Margin.Mini))
Text(text = stringResource(titleRes), style = SwissTransferTheme.typography.h1)
}

item { 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 @@ -18,14 +18,12 @@
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
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.PreviewParameter
import com.infomaniak.multiplatform_swisstransfer.common.interfaces.ui.TransferUi
import com.infomaniak.multiplatform_swisstransfer.common.models.TransferDirection
Expand Down Expand Up @@ -58,7 +56,7 @@ fun TransfersListWithExpiredBottomSheet(
navigateToDetails(transfer.uuid)
}
},
contentPadding = PaddingValues(Margin.Medium),
contentPadding = PaddingValues(top = Margin.Large, bottom = Margin.Medium, start = Margin.Medium, end = Margin.Medium),
)

TransferExpiredBottomSheet(
Expand Down

0 comments on commit 4d4e02f

Please sign in to comment.