What is the best way to prevent navigation fast do...
# compose
k
What is the best way to prevent navigation fast double-tap opening same screen twice?
a
Assuming you’re using
navigation-compose
, check if the current `NavBackStackEntry`’s
Lifecycle
is
RESUMED
After the first tap navigates,
NavBackStackEntry
will no longer be
RESUMED
, which allows you to filter the second tap’s navigation request. An example of that is here: https://github.com/android/compose-samples/blob/e840fb90607069eb431f68d5291f03f400[…]k/app/src/main/java/com/example/jetsnack/ui/JetsnackAppState.kt
k
Thanks Alex. Is this something that will be implemented in the future in the library?