From 9077058b3f90210aea96f6fb4f1b0f6c0dc7edea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=BBerko?= Date: Tue, 2 Apr 2024 09:37:58 +0200 Subject: [PATCH] fix: padding for single asset in import media [WPB-1839] (#2844) --- .../wire/android/ui/sharing/ImportMediaScreen.kt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/app/src/main/kotlin/com/wire/android/ui/sharing/ImportMediaScreen.kt b/app/src/main/kotlin/com/wire/android/ui/sharing/ImportMediaScreen.kt index 9e5ef6059da..5338e4d37ec 100644 --- a/app/src/main/kotlin/com/wire/android/ui/sharing/ImportMediaScreen.kt +++ b/app/src/main/kotlin/com/wire/android/ui/sharing/ImportMediaScreen.kt @@ -373,10 +373,15 @@ private fun ImportMediaContent( val itemWidth = if (isMultipleImport) dimensions().importedMediaAssetSize + horizontalPadding.times(2) else screenWidth - (horizontalPadding * 2) - val contentPadding = PaddingValues( - start = horizontalPadding, - end = (screenWidth - itemWidth + horizontalPadding) - ) + val contentPadding = if (isMultipleImport) { + PaddingValues( + start = horizontalPadding, + end = (screenWidth - itemWidth + horizontalPadding) + ) + } else { + val totalPadding = screenWidth - itemWidth + PaddingValues(start = totalPadding / 2, end = totalPadding / 2) + } val lazyListState = rememberLazyListState() if (state.isImporting) { Box(