Skip to content

Commit

Permalink
Rename upload source choice bottom sheet for coherence
Browse files Browse the repository at this point in the history
  • Loading branch information
LunarX committed Aug 19, 2024
1 parent 3241582 commit 2d429aa
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import com.infomaniak.swisstransfer.ui.utils.PreviewTablet

@Composable
fun ImportFilesScreen() {
var showImportChoiceBottomSheet by remember { mutableStateOf(false) }
var showUploadSourceChoiceBottomSheet by remember { mutableStateOf(false) }

BottomStickyButtonScaffold(
topBar = { SwissTransferTobAppBar() },
Expand All @@ -48,7 +48,7 @@ fun ImportFilesScreen() {
titleRes = R.string.buttonAddFiles,
imageVector = AppIcons.Add,
style = ButtonType.TERTIARY,
onClick = { showImportChoiceBottomSheet = true },
onClick = { showUploadSourceChoiceBottomSheet = true },
)
},
bottomButton = { modifier ->
Expand All @@ -60,20 +60,20 @@ fun ImportFilesScreen() {
},
) {
Column {
ImportChoiceBottomSheet(
showImportChoiceBottomSheet = { showImportChoiceBottomSheet },
onDismissRequest = { showImportChoiceBottomSheet = false },
UploadSourceChoiceBottomSheet(
showUploadSourceChoiceBottomSheet = { showUploadSourceChoiceBottomSheet },
onDismissRequest = { showUploadSourceChoiceBottomSheet = false },
)
}
}
}

@Composable
private fun ImportChoiceBottomSheet(
showImportChoiceBottomSheet: () -> Boolean,
private fun UploadSourceChoiceBottomSheet(
showUploadSourceChoiceBottomSheet: () -> Boolean,
onDismissRequest: () -> Unit,
) {
if (showImportChoiceBottomSheet()) {
if (showUploadSourceChoiceBottomSheet()) {
SwissTransferBottomSheet(
onDismissRequest = onDismissRequest,
titleRes = R.string.transferUploadSourceChoiceTitle,
Expand Down Expand Up @@ -105,7 +105,7 @@ private fun ImportFilesScreenPreview() {
private fun ImportChoiceBottomSheetPreview() {
SwissTransferTheme {
Surface {
ImportChoiceBottomSheet({ true }, {})
UploadSourceChoiceBottomSheet({ true }, {})
}
}
}

0 comments on commit 2d429aa

Please sign in to comment.