Locations are keeping past BeamLocation.history
even after "disposed"
#417
Labels
Milestone
BeamLocation.history
even after "disposed"
#417
Describe the bug
After coming back to a previously navigated
BeamLocation
(meaning that it was disposed from thebeamingHistory
stack), it still keeps itsBeamLocation.history
state stored. It seems that the instance is never disposed/re-created.Beamer version:
1.0.0
To Reproduce
Minimal reproducible code
To reproduce the behavior, using the code above:
beam to /b
button, thenbeamBack
.beam to /alt-b
button, thenbeamBack
./a
, we will back to/b
page, which now exists in thehistory
stack.The same can be done if navigated to
alt-b
, then tob
. It doesn't matter, the "history" of that particular stack is preserved, even after it's dismissed.Expected behavior
Expected that, after the
BeamLocation
was disposed, all of its history should be "cleared".On
0.14.1
it was working properly - aBeamLocation
that was "disposed" never stored previous states, I've tested the code above to certify of that.Working in any OS.
Additional context
I've tried to track down this bug and it seems that it's related to
BeamerLocationBuilder
and how it deals withBeamLocation.isCurrent
, which is a new behavior added in1.0.0
. If you debug thisisCurrent
, after webeamBack
from/b
to/a
, theLocationB
, never gets itsisCurrent
property updated tofalse
, and the currentLocationA
also isn't updatedisCurrent
totrue
, which makes me think thatbeamer
goes into an inconsistent state.So, related debugged functions that seems odd to me are:
BeamLocation.create
(which is used inUtils.chooseBeamLocation
) and_addToBeamingHistory
, which handles theisCurrent
behavior. All of which are related toBeamerLocationBuilder
.The text was updated successfully, but these errors were encountered: