You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a StackOverflow question about this issue?
I have searched StackOverflow
What happened?
When rapidly tapping the back button in the topicScreen component, unintended back navigation occurs. The current implementation of the onBackClick directly calls listDetailNavigator.navigateBack() without first checking if navigation is allowed, leading to unexpected behavior.
I expected the back navigation to occur only when it is allowed, preventing any unintended navigation when the back button is tapped multiple times in quick succession. Specifically, the onBackClick should check listDetailNavigator.canNavigateBack() before calling navigateBack() to ensure that the back navigation is permitted.
In typical scenarios using a standard navController, this issue can be avoided by checking the lifecycle state of the navBackStackEntry before popping the back stack:
if (navController.currentBackStackEntry?.lifecycle?.currentState ==Lifecycle.State.RESUMED) {
navController.popBackStack()
}
Relevant logcat output
No response
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Is there a StackOverflow question about this issue?
What happened?
When rapidly tapping the back button in the
topicScreen
component, unintended back navigation occurs. The current implementation of theonBackClick
directly callslistDetailNavigator.navigateBack()
without first checking if navigation is allowed, leading to unexpected behavior.I expected the back navigation to occur only when it is allowed, preventing any unintended navigation when the back button is tapped multiple times in quick succession. Specifically, the
onBackClick
should checklistDetailNavigator.canNavigateBack()
before callingnavigateBack()
to ensure that the back navigation is permitted.In typical scenarios using a standard
navController
, this issue can be avoided by checking the lifecycle state of thenavBackStackEntry
before popping the back stack:Relevant logcat output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: