android / nowinandroid

A fully functional Android app built entirely with Kotlin and Jetpack Compose
Apache License 2.0
15.92k stars 2.81k forks source link

Avoid popUpTo and navigateTo same route #1470

Open anhtuannd opened 1 month ago

anhtuannd commented 1 month ago

Fix for #1463 and #1465

The issue arises when both popUpTo() and navigate() target the same route. This can lead to unexpected behavior in navigation within NIA.

If start destination and target destination are same, we can just set saveState and restoreState to false.