Skip to content

Commit

Permalink
fix navigation and activity results
Browse files Browse the repository at this point in the history
  • Loading branch information
toluo-stripe committed Jan 3, 2025
1 parent bf11f9a commit 8384f51
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ internal class LinkActivityViewModel @Inject constructor(
val navController = navController ?: return
navController.navigate(screen.route) {
if (clearStack) {
popUpTo(navController.graph.startDestinationId) {
popUpTo(navController.graph.id) {
inclusive = true
}
}
Expand All @@ -132,8 +132,14 @@ internal class LinkActivityViewModel @Inject constructor(
AccountStatus.NeedsVerification, AccountStatus.VerificationStarted -> LinkScreen.Verification
AccountStatus.SignedOut, AccountStatus.Error -> LinkScreen.SignUp
}
navController?.navigate(screen.route) {
navigate(screen, clearStack = true)

val navController = navController ?: return@launch
navController.navigate(screen.route) {
launchSingleTop = true
popUpTo(navController.graph.id) {
inclusive = true
}
}
}
}
Expand Down

0 comments on commit 8384f51

Please sign in to comment.