diff options
author | Joffrey Bion <joffrey.bion@booking.com> | 2020-03-29 12:23:28 +0200 |
---|---|---|
committer | Joffrey Bion <joffrey.bion@booking.com> | 2020-03-29 12:23:28 +0200 |
commit | fd37af70f420c2338595e7f9df23296a376a901b (patch) | |
tree | 8d1d89a4eb917735c72fe7ee101aec125f9495f8 /sw-ui-kt/src/main/kotlin/org/luxons | |
parent | Simplify redux state (diff) | |
download | seven-wonders-fd37af70f420c2338595e7f9df23296a376a901b.tar.gz seven-wonders-fd37af70f420c2338595e7f9df23296a376a901b.tar.bz2 seven-wonders-fd37af70f420c2338595e7f9df23296a376a901b.zip |
Ensure error saga starts first
Diffstat (limited to 'sw-ui-kt/src/main/kotlin/org/luxons')
-rw-r--r-- | sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/redux/sagas/Sagas.kt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/redux/sagas/Sagas.kt b/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/redux/sagas/Sagas.kt index 2a501566..2f856c7f 100644 --- a/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/redux/sagas/Sagas.kt +++ b/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/redux/sagas/Sagas.kt @@ -2,6 +2,7 @@ package org.luxons.sevenwonders.ui.redux.sagas import kotlinx.coroutines.coroutineScope import kotlinx.coroutines.launch +import kotlinx.coroutines.yield import org.luxons.sevenwonders.client.SevenWondersClient import org.luxons.sevenwonders.client.SevenWondersSession import org.luxons.sevenwonders.ui.redux.RequestChooseName @@ -22,6 +23,7 @@ suspend fun SwSagaContext.rootSaga() = coroutineScope { launch { errorSaga(session) } + yield() // ensures the error saga starts val player = session.chooseName(action.playerName) dispatch(SetCurrentPlayerAction(player)) |