Skip to content

Commit

Permalink
review: Simplify UploadSuccessEmailScreen code
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBoulongne committed Nov 13, 2024
1 parent b5d6568 commit 1d7a6f0
Showing 1 changed file with 20 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,34 +50,30 @@ fun UploadSuccessEmailScreen(
onClick = closeActivity,
)
},
content = { Content(emails) },
)
}

@Composable
private fun Content(emails: List<String>) {
Column(
modifier = Modifier
.fillMaxSize()
.verticalScroll(rememberScrollState())
.padding(Margin.Medium),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.Center,
) {
Column(
modifier = Modifier
.fillMaxSize()
.verticalScroll(rememberScrollState())
.padding(Margin.Medium),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.Center,
) {

IllustratedMessageBlock(
icon = AppIllus.Beers.image(),
title = TransferType.MAIL.titleRes,
description = pluralStringResource(TransferType.MAIL.descriptionRes!!, emails.count()),
)
IllustratedMessageBlock(
icon = AppIllus.Beers.image(),
title = TransferType.MAIL.titleRes,
description = pluralStringResource(TransferType.MAIL.descriptionRes!!, emails.count()),
)

Spacer(modifier = Modifier.height(Margin.Medium))
Spacer(modifier = Modifier.height(Margin.Medium))

EmailsFlowRow(
emails = emails,
modifier = Modifier.widthIn(max = 800.dp),
horizontalArrangement = Arrangement.Center,
)
EmailsFlowRow(
emails = emails,
modifier = Modifier.widthIn(max = 800.dp),
horizontalArrangement = Arrangement.Center,
)
}
}
}

Expand Down

0 comments on commit 1d7a6f0

Please sign in to comment.