mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 15:44:54 +00:00
Merge pull request #3823 from element-hq/feature/bma/lastDevice
Remove code duplication - no behavior change.
This commit is contained in:
+6
-13
@@ -248,25 +248,18 @@ private fun VerifySelfSessionBottomMenu(
|
|||||||
Step.Loading -> error("Should not happen")
|
Step.Loading -> error("Should not happen")
|
||||||
is Step.Initial -> {
|
is Step.Initial -> {
|
||||||
VerificationBottomMenu {
|
VerificationBottomMenu {
|
||||||
if (verificationViewState.isLastDevice) {
|
if (verificationViewState.isLastDevice.not()) {
|
||||||
Button(
|
|
||||||
modifier = Modifier.fillMaxWidth(),
|
|
||||||
text = stringResource(R.string.screen_session_verification_enter_recovery_key),
|
|
||||||
onClick = onEnterRecoveryKey,
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
Button(
|
Button(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
text = stringResource(R.string.screen_identity_use_another_device),
|
text = stringResource(R.string.screen_identity_use_another_device),
|
||||||
onClick = { eventSink(VerifySelfSessionViewEvents.RequestVerification) },
|
onClick = { eventSink(VerifySelfSessionViewEvents.RequestVerification) },
|
||||||
)
|
)
|
||||||
Button(
|
|
||||||
modifier = Modifier.fillMaxWidth(),
|
|
||||||
text = stringResource(R.string.screen_session_verification_enter_recovery_key),
|
|
||||||
onClick = onEnterRecoveryKey,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
// This option should always be displayed
|
Button(
|
||||||
|
modifier = Modifier.fillMaxWidth(),
|
||||||
|
text = stringResource(R.string.screen_session_verification_enter_recovery_key),
|
||||||
|
onClick = onEnterRecoveryKey,
|
||||||
|
)
|
||||||
OutlinedButton(
|
OutlinedButton(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
text = stringResource(R.string.screen_identity_confirmation_cannot_confirm),
|
text = stringResource(R.string.screen_identity_confirmation_cannot_confirm),
|
||||||
|
|||||||
Reference in New Issue
Block a user