mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:55:41 +00:00
Rename fun in Callback for clarity.
This commit is contained in:
committed by
Benoit Marty
parent
353c00e032
commit
43972dba68
+5
-6
@@ -82,23 +82,22 @@ class FtueSessionVerificationFlowNode(
|
||||
return when (navTarget) {
|
||||
is NavTarget.Root -> {
|
||||
val callback = object : ChooseSelfVerificationModeNode.Callback {
|
||||
override fun onUseAnotherDevice() {
|
||||
override fun navigateToUseAnotherDevice() {
|
||||
backstack.push(NavTarget.UseAnotherDevice)
|
||||
}
|
||||
|
||||
override fun onUseRecoveryKey() {
|
||||
override fun navigateToUseRecoveryKey() {
|
||||
backstack.push(NavTarget.EnterRecoveryKey)
|
||||
}
|
||||
|
||||
override fun onResetKey() {
|
||||
override fun navigateToResetKey() {
|
||||
backstack.push(NavTarget.ResetIdentity)
|
||||
}
|
||||
|
||||
override fun onLearnMoreAboutEncryption() {
|
||||
override fun navigateToLearnMoreAboutEncryption() {
|
||||
learnMoreUrl.value = LearnMoreConfig.DEVICE_VERIFICATION_URL
|
||||
}
|
||||
}
|
||||
|
||||
createNode<ChooseSelfVerificationModeNode>(buildContext, plugins = listOf(callback))
|
||||
}
|
||||
is NavTarget.UseAnotherDevice -> {
|
||||
@@ -116,7 +115,7 @@ class FtueSessionVerificationFlowNode(
|
||||
backstack.pop()
|
||||
}
|
||||
|
||||
override fun onLearnMoreAboutEncryption() {
|
||||
override fun navigateToLearnMoreAboutEncryption() {
|
||||
// Note that this callback is never called. The "Learn more" link is not displayed
|
||||
// for the self session interactive verification.
|
||||
}
|
||||
|
||||
+8
-8
@@ -29,10 +29,10 @@ class ChooseSelfVerificationModeNode(
|
||||
private val directLogoutView: DirectLogoutView,
|
||||
) : Node(buildContext, plugins = plugins) {
|
||||
interface Callback : Plugin {
|
||||
fun onUseAnotherDevice()
|
||||
fun onUseRecoveryKey()
|
||||
fun onResetKey()
|
||||
fun onLearnMoreAboutEncryption()
|
||||
fun navigateToUseAnotherDevice()
|
||||
fun navigateToUseRecoveryKey()
|
||||
fun navigateToResetKey()
|
||||
fun navigateToLearnMoreAboutEncryption()
|
||||
}
|
||||
|
||||
private val callback = plugins<Callback>().first()
|
||||
@@ -43,10 +43,10 @@ class ChooseSelfVerificationModeNode(
|
||||
|
||||
ChooseSelfVerificationModeView(
|
||||
state = state,
|
||||
onUseAnotherDevice = callback::onUseAnotherDevice,
|
||||
onUseRecoveryKey = callback::onUseRecoveryKey,
|
||||
onResetKey = callback::onResetKey,
|
||||
onLearnMore = callback::onLearnMoreAboutEncryption,
|
||||
onUseAnotherDevice = callback::navigateToUseAnotherDevice,
|
||||
onUseRecoveryKey = callback::navigateToUseRecoveryKey,
|
||||
onResetKey = callback::navigateToResetKey,
|
||||
onLearnMore = callback::navigateToLearnMoreAboutEncryption,
|
||||
modifier = modifier,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user