mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Fix navigation issue when entering recovery key after navigating from the banner.
This commit is contained in:
@@ -400,6 +400,11 @@ class LoggedInFlowNode @AssistedInject constructor(
|
|||||||
is NavTarget.SecureBackup -> {
|
is NavTarget.SecureBackup -> {
|
||||||
secureBackupEntryPoint.nodeBuilder(this, buildContext)
|
secureBackupEntryPoint.nodeBuilder(this, buildContext)
|
||||||
.params(SecureBackupEntryPoint.Params(initialElement = navTarget.initialElement))
|
.params(SecureBackupEntryPoint.Params(initialElement = navTarget.initialElement))
|
||||||
|
.callback(object : SecureBackupEntryPoint.Callback {
|
||||||
|
override fun onDone() {
|
||||||
|
backstack.pop()
|
||||||
|
}
|
||||||
|
})
|
||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
NavTarget.Ftue -> {
|
NavTarget.Ftue -> {
|
||||||
|
|||||||
+7
-2
@@ -111,13 +111,18 @@ class SecureBackupFlowNode @AssistedInject constructor(
|
|||||||
NavTarget.EnterRecoveryKey -> {
|
NavTarget.EnterRecoveryKey -> {
|
||||||
val callback = object : SecureBackupEnterRecoveryKeyNode.Callback {
|
val callback = object : SecureBackupEnterRecoveryKeyNode.Callback {
|
||||||
override fun onEnterRecoveryKeySuccess() {
|
override fun onEnterRecoveryKeySuccess() {
|
||||||
if (callbacks.isNotEmpty()) {
|
when (plugins.filterIsInstance<SecureBackupEntryPoint.Params>().first().initialElement) {
|
||||||
|
SecureBackupEntryPoint.InitialTarget.EnterRecoveryKey -> {
|
||||||
callbacks.forEach { it.onDone() }
|
callbacks.forEach { it.onDone() }
|
||||||
} else {
|
}
|
||||||
|
SecureBackupEntryPoint.InitialTarget.ResetIdentity,
|
||||||
|
SecureBackupEntryPoint.InitialTarget.Root,
|
||||||
|
SecureBackupEntryPoint.InitialTarget.SetUpRecovery -> {
|
||||||
backstack.pop()
|
backstack.pop()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
createNode<SecureBackupEnterRecoveryKeyNode>(buildContext, plugins = listOf(callback))
|
createNode<SecureBackupEnterRecoveryKeyNode>(buildContext, plugins = listOf(callback))
|
||||||
}
|
}
|
||||||
is NavTarget.ResetIdentity -> {
|
is NavTarget.ResetIdentity -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user