From 69692a78e0a1f7c657eeea1c98b7ec9d3746280a Mon Sep 17 00:00:00 2001 From: Gabriel Ittner Date: Fri, 21 Jun 2024 10:18:04 +0200 Subject: [PATCH] try guarding against late action dispatches to sub state machine --- .../flowredux/sideeffects/OnEnterStartStateMachine.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/flowredux/src/commonMain/kotlin/com/freeletics/flowredux/sideeffects/OnEnterStartStateMachine.kt b/flowredux/src/commonMain/kotlin/com/freeletics/flowredux/sideeffects/OnEnterStartStateMachine.kt index 4245deaf..7b9eefc1 100644 --- a/flowredux/src/commonMain/kotlin/com/freeletics/flowredux/sideeffects/OnEnterStartStateMachine.kt +++ b/flowredux/src/commonMain/kotlin/com/freeletics/flowredux/sideeffects/OnEnterStartStateMachine.kt @@ -42,8 +42,10 @@ internal class OnEnterStartStateMachine + runOnlyIfInInputState(getState) { + subStateMachine.dispatch(action) + } } } }