Skip to content

Commit

Permalink
Merge pull request #3961 from element-hq/feature/bma/passphraseIssue
Browse files Browse the repository at this point in the history
Fix navigation issue when entering recovery key after navigating from the banner
  • Loading branch information
bmarty authored Nov 29, 2024
2 parents 31f9fa2 + 646b92a commit 3677c43
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,11 @@ class LoggedInFlowNode @AssistedInject constructor(
is NavTarget.SecureBackup -> {
secureBackupEntryPoint.nodeBuilder(this, buildContext)
.params(SecureBackupEntryPoint.Params(initialElement = navTarget.initialElement))
.callback(object : SecureBackupEntryPoint.Callback {
override fun onDone() {
backstack.pop()
}
})
.build()
}
NavTarget.Ftue -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import io.element.android.features.securebackup.impl.root.SecureBackupRootNode
import io.element.android.features.securebackup.impl.setup.SecureBackupSetupNode
import io.element.android.libraries.architecture.BackstackView
import io.element.android.libraries.architecture.BaseFlowNode
import io.element.android.libraries.architecture.appyx.canPop
import io.element.android.libraries.architecture.createNode
import io.element.android.libraries.di.SessionScope
import kotlinx.parcelize.Parcelize
Expand Down Expand Up @@ -111,10 +112,10 @@ class SecureBackupFlowNode @AssistedInject constructor(
NavTarget.EnterRecoveryKey -> {
val callback = object : SecureBackupEnterRecoveryKeyNode.Callback {
override fun onEnterRecoveryKeySuccess() {
if (callbacks.isNotEmpty()) {
callbacks.forEach { it.onDone() }
} else {
if (backstack.canPop()) {
backstack.pop()
} else {
callbacks.forEach { it.onDone() }
}
}
}
Expand Down

0 comments on commit 3677c43

Please sign in to comment.