From 0ea5fc6ad6b5ccc703d3d7ffb4084f44433a27a2 Mon Sep 17 00:00:00 2001 From: Gibran Chevalley Date: Wed, 13 Nov 2024 09:09:25 +0100 Subject: [PATCH] Apply suggestions from code review to clean the code --- .../ui/screen/newtransfer/upload/UploadSuccessQrScreen.kt | 5 +---- .../newtransfer/upload/components/ShareAndCopyButtons.kt | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/upload/UploadSuccessQrScreen.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/upload/UploadSuccessQrScreen.kt index 0381b04f1..7ae4d7ab1 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/upload/UploadSuccessQrScreen.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/upload/UploadSuccessQrScreen.kt @@ -93,10 +93,7 @@ private fun ColumnScope.ScreenContent( private fun SuccessMessage(transferType: TransferType, transferUrl: String) { Spacer(modifier = Modifier.height(Margin.Medium)) - Image( - imageVector = AppIllus.Beers.image(), - contentDescription = null, - ) + Image(imageVector = AppIllus.Beers.image(), contentDescription = null) Spacer(Modifier.height(Margin.Huge)) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/upload/components/ShareAndCopyButtons.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/upload/components/ShareAndCopyButtons.kt index 78f9f7360..2531fbe26 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/upload/components/ShareAndCopyButtons.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/upload/components/ShareAndCopyButtons.kt @@ -73,6 +73,7 @@ fun ColumnScope.ShareAndCopyButtons(modifier: Modifier = Modifier, transferLink: ) } } + @Composable private fun RowScope.ShareCopyButton(icon: ImageVector, @StringRes textRes: Int, onClick: () -> Unit) { Button( @@ -80,7 +81,7 @@ private fun RowScope.ShareCopyButton(icon: ImageVector, @StringRes textRes: Int, shape = CustomShapes.MEDIUM, colors = ButtonType.SECONDARY.buttonColors(), contentPadding = PaddingValues(vertical = Margin.Medium), - onClick = onClick + onClick = onClick, ) { Column( horizontalAlignment = Alignment.CenterHorizontally, @@ -93,7 +94,6 @@ private fun RowScope.ShareCopyButton(icon: ImageVector, @StringRes textRes: Int, } } - @PreviewLightAndDark @Composable private fun Preview() {