Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create IsInState interface, add val for it to InStateSideEffectBuilder #503

Merged
merged 1 commit into from
Jun 14, 2023

Conversation

gabrielittner
Copy link
Member

We'll need to split state checks into 2 different kinds:

  • One for checking whether we should start this side effect, this will match the current checks
  • The other one for whether we should terminate the side effect. For the current things this will be the same but for anything inside the identity block this will need to check that the identity of the current state is still the same as the identity of the state that started the side effect. The reason for separating isInState for this purpose is to avoid reimpleting all side effects again for the identity block.
    To avoid mistakes I want to have 2 separate interfaces for these 2. This introduces the first one that just matches the current checks. The second one will be introduced further into the refactoring.

InStateSideEffectBuilder will have this as an abstract val which already allows using it directly in runOnlyIfInInputState and will enable the next pr to share a bit more code for the side effects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants