Skip to content

Commit

Permalink
Disable Next button while there is no files in the Transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBoulongne committed Sep 18, 2024
1 parent 81aa7c2 commit 216e66e
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import com.infomaniak.swisstransfer.ui.utils.PreviewTablet
@Composable
fun ImportFilesScreen(navigateToTransferTypeScreen: () -> Unit, closeActivity: () -> Unit) {
var showUploadSourceChoiceBottomSheet by rememberSaveable { mutableStateOf(false) }
var isNextButtonEnabled by rememberSaveable { mutableStateOf(false) }

BottomStickyButtonScaffold(
topBar = {
Expand All @@ -50,13 +51,17 @@ fun ImportFilesScreen(navigateToTransferTypeScreen: () -> Unit, closeActivity: (
titleRes = R.string.buttonAddFiles,
imageVector = AppIcons.Add,
style = ButtonType.TERTIARY,
onClick = { showUploadSourceChoiceBottomSheet = true },
onClick = {
showUploadSourceChoiceBottomSheet = true
isNextButtonEnabled = true // TODO: Move this where it should be
},
)
},
bottomButton = { modifier ->
LargeButton(
modifier = modifier,
titleRes = R.string.buttonNext,
enabled = isNextButtonEnabled,
onClick = { navigateToTransferTypeScreen() },
)
},
Expand Down

0 comments on commit 216e66e

Please sign in to comment.