Skip to content

Commit

Permalink
Ignore duplicate navigations
Browse files Browse the repository at this point in the history
Fixes #41
  • Loading branch information
saket committed Oct 8, 2023
1 parent 25ee0af commit cd8b01c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ class CascadeState internal constructor() {
}

internal fun navigateTo(entry: CascadeBackStackEntry) {
backStack.add(entry)
if (entry != backStack.lastOrNull()) {
backStack.add(entry)
}
}

internal fun backStackSnapshot(): BackStackSnapshot {
Expand Down

0 comments on commit cd8b01c

Please sign in to comment.