Closed Nublo closed 2 years ago
To reproduce we need to have next setup:
|--> MainContainerRIB |--|--> ChildContainerRIB1 |--|--|--> ChildRib1 |--|--> ChildRIB2
ChildContainerRIB1.ChildRIB1
ChildRIB2
ChildContainerRIB1
ChildRIB1
Explanation of what is happening:
RoutingStatePool.individual()
Effect.Individual.PendingDeactivateTrue
ChildRib1
pendingDeactivate
Effect.Individual.Deactivated
INACTIVE
com.badoo.ribs.routing.state.feature.state.WorkingState.toSavedState() ... !pendingDeactivate.contains(entry.key) -> original else -> original.withActivationState( activationState = RoutingContext.ActivationState.INACTIVE ) ...
WakeUpAction
SLEEPING
Solution proposed is to cleanup pendingDeactivate and pendingRemoval when receiving Removed|Activated|Deactivated effects.
pendingRemoval
Removed|Activated|Deactivated
To reproduce we need to have next setup:
ChildContainerRIB1.ChildRIB1
configurationChildRIB2
configurationChildContainerRIB1
.ChildRIB1
view is not attached.Explanation of what is happening:
RoutingStatePool.individual()
Effect.Individual.PendingDeactivateTrue
forChildRib1
which add this key intopendingDeactivate
Effect.Individual.Deactivated
but we do not clearChildRIB1
key frompendingDeactivate
pendingDeactivate
and moves it to theINACTIVE
state.INACTIVE
state and then is never becomes activated.WakeUpAction
which activates onlySLEEPING
nodes.Solution proposed is to cleanup
pendingDeactivate
andpendingRemoval
when receivingRemoved|Activated|Deactivated
effects.