badoo / RIBs

Badoo's take on RIBs
Apache License 2.0
162 stars 50 forks source link

GlobalActivationLevel should be SLEEPING when node is stopped. #345

Open SamuPS opened 2 years ago

SamuPS commented 2 years ago

When node is stopped, it could still receive configuration changes. In that case, if transitionHandler is present, transitionAnimation would be triggered but, as UI is not there, will cause configuration to change but view wont exist.

How to solve: Move globalActivationState to SLEEPING when node is stopped. Check ActivityIntegrationPoint.

How to reproduce:

  1. Create an activity with a rib tree that is a Parent with a button + 2 rib childs(RibA + RibB). RibA is default one.
  2. In Container interactor bind some source( input,dependency...) to a configuration change use node.createDestroy{} scope.
  3. From the parent button trigger a new activity, from that activity modify the source binded to configuration to push RibB.
  4. Go back to initial activity.
  5. Expected Behaviour: RibB is present. Actual Behaviour: No rib is present.