Verification: always render the back button.
This commit is contained in:
parent
070c80bd51
commit
1dfe26e67a
2 changed files with 13 additions and 19 deletions
|
|
@ -70,11 +70,7 @@ fun IncomingVerificationView(
|
||||||
TopAppBar(
|
TopAppBar(
|
||||||
title = {},
|
title = {},
|
||||||
navigationIcon = {
|
navigationIcon = {
|
||||||
when {
|
BackButton(onClick = { state.eventSink(IncomingVerificationViewEvents.GoBack) })
|
||||||
step is Step.Initial && !step.isWaiting -> Unit
|
|
||||||
step is Step.Completed -> Unit
|
|
||||||
else -> BackButton(onClick = { state.eventSink(IncomingVerificationViewEvents.GoBack) })
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
colors = topAppBarColors(containerColor = Color.Transparent),
|
colors = topAppBarColors(containerColor = Color.Transparent),
|
||||||
)
|
)
|
||||||
|
|
@ -144,12 +140,12 @@ private fun IncomingVerificationHeader(step: Step, request: VerificationRequest.
|
||||||
}
|
}
|
||||||
IconTitleSubtitleMolecule(
|
IconTitleSubtitleMolecule(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(bottom = 16.dp)
|
.padding(bottom = 16.dp)
|
||||||
.semantics(mergeDescendants = true) {
|
.semantics(mergeDescendants = true) {
|
||||||
contentDescription = timeLimitMessage
|
contentDescription = timeLimitMessage
|
||||||
focused = true
|
focused = true
|
||||||
}
|
}
|
||||||
.focusable(),
|
.focusable(),
|
||||||
iconStyle = iconStyle,
|
iconStyle = iconStyle,
|
||||||
title = stringResource(id = titleTextId),
|
title = stringResource(id = titleTextId),
|
||||||
subTitle = stringResource(id = subtitleTextId),
|
subTitle = stringResource(id = subtitleTextId),
|
||||||
|
|
@ -186,8 +182,8 @@ private fun ContentInitial(
|
||||||
)
|
)
|
||||||
Text(
|
Text(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.align(Alignment.CenterHorizontally)
|
.align(Alignment.CenterHorizontally)
|
||||||
.padding(bottom = 16.dp),
|
.padding(bottom = 16.dp),
|
||||||
text = stringResource(R.string.screen_session_verification_request_footer),
|
text = stringResource(R.string.screen_session_verification_request_footer),
|
||||||
style = ElementTheme.typography.fontBodyMdMedium,
|
style = ElementTheme.typography.fontBodyMdMedium,
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
|
|
@ -197,8 +193,8 @@ private fun ContentInitial(
|
||||||
is VerificationRequest.Incoming.User -> {
|
is VerificationRequest.Incoming.User -> {
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(top = 24.dp),
|
.padding(top = 24.dp),
|
||||||
) {
|
) {
|
||||||
VerificationUserProfileContent(
|
VerificationUserProfileContent(
|
||||||
user = request.details.senderProfile,
|
user = request.details.senderProfile,
|
||||||
|
|
|
||||||
|
|
@ -94,10 +94,8 @@ fun OutgoingVerificationView(
|
||||||
topBar = {
|
topBar = {
|
||||||
TopAppBar(
|
TopAppBar(
|
||||||
title = {},
|
title = {},
|
||||||
navigationIcon = if (step != Step.Completed) {
|
navigationIcon = {
|
||||||
{ BackButton(onClick = ::cancelOrResetFlow) }
|
BackButton(onClick = ::cancelOrResetFlow)
|
||||||
} else {
|
|
||||||
{}
|
|
||||||
},
|
},
|
||||||
colors = topAppBarColors(containerColor = Color.Transparent)
|
colors = topAppBarColors(containerColor = Color.Transparent)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue