invoking goBack will break navigation if nav transitions are used
sphrak opened this issue · comments
Hello,
This seems to have been introduced between somewhere 1.5.8..1.5.9 - what happens when the bug occurs is that canGoBack
always returns false
here
Made a repro here: https://github.com/sphrak/precompose-gobackbug
Steps:
- click some destinations
- click "back button"
- click some destinations again
- ???
- can no longer navigate
AFAIK the bug only happens if you have navTransitions
specified ie https://github.com/sphrak/precompose-gobackbug/blob/main/src/main/kotlin/Main.kt#L96
I will investigate more tomorrow.
Nice catch! I'm being busy recent week so might not have time to figure it out recentlly.
@Tlaster no worries, I have done some more investigation and while I still don't understand completely why it happens it seems to have to do with specifying ExitTransition.None
/EnterTransition.None
.. If I use fadeIn
, fadeOut
or simply dont specify any (effectively using the default NavTransition) instead then the bug goes away.
My guess is that navigator.stackManager.canNavigate = !transition.isRunning
will always evaluate to false
when *Transition.None
is used..