Skip to content

Commit

Permalink
fix popToTop duplicate destination
Browse files Browse the repository at this point in the history
  • Loading branch information
vkatz committed Feb 13, 2024
1 parent b0fa3ee commit 9cd5b9b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
}

val libName = "io.github.composegears"
val libVersion = "0.1.0-alpha"
val libVersion = "0.1.0-alpha02"

group = libName
version = libVersion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ class NavController internal constructor(
navArgs: Args? = null,
transition: ContentTransform? = null
) {
if (currentNavEntry?.destination?.name == dest.name) return
val entry = backStack.find { it.destination.name == dest.name }
if (entry != null) {
if (currentNavEntry != null) backStack.add(currentNavEntry!!.apply { saveState() })
Expand Down

0 comments on commit 9cd5b9b

Please sign in to comment.