FlowStepPage: make onBackClicked nullable and remove canGoBack.

This commit is contained in:
Benoit Marty
2023-11-07 10:52:12 +01:00
committed by Benoit Marty
parent 163bc8703f
commit 7bd2ccd2a9
6 changed files with 6 additions and 13 deletions
@@ -56,7 +56,6 @@ fun SecureBackupDisableView(
}
FlowStepPage(
modifier = modifier,
canGoBack = true,
onBackClicked = onBackClicked,
title = stringResource(id = R.string.screen_key_backup_disable_title),
subTitle = stringResource(id = R.string.screen_key_backup_disable_description),
@@ -46,7 +46,6 @@ fun SecureBackupEnableView(
}
FlowStepPage(
modifier = modifier,
canGoBack = true,
onBackClicked = onBackClicked,
title = stringResource(id = R.string.screen_chat_backup_key_backup_action_enable),
iconResourceId = CommonDrawables.ic_key,
@@ -50,7 +50,6 @@ fun SecureBackupEnterRecoveryKeyView(
FlowStepPage(
modifier = modifier,
canGoBack = true,
onBackClicked = onBackClicked,
iconResourceId = CommonDrawables.ic_key,
title = stringResource(id = R.string.screen_recovery_key_confirm_title),
@@ -48,8 +48,7 @@ fun SecureBackupSetupView(
) {
FlowStepPage(
modifier = modifier,
canGoBack = state.canGoBack(),
onBackClicked = onBackClicked,
onBackClicked = onBackClicked.takeIf { state.canGoBack() },
title = title(state),
subTitle = subtitle(state),
iconResourceId = CommonDrawables.ic_key,