If I have certain actions, which are allowed in certain state, where they dont change it state, however those actions are async, so need to change "some" state to pending, in order to avoid multiple calls until the async is finished
i.e. I have call states, for example one of which is Activated, and I have actions like MuteMic, where this action is only allowed in Activated state
but lets say MuteMic is heavy / or async, so I need to surround it with pending state, should that pending state be part of the call state hierarchy, i.e. on the same level as Activated is, or somehow nested inside it, or separate state machine?,
when state == Activated
when action == MuteMic
state = ActivatedMuteMicPending
effect(Effect.DoMuteMic)
state = Activated
sealed class State {
object Activated,
object ActivatedMuteMicPending
}
im not sure if this is good design