diff options
author | Joffrey Bion <joffrey.bion@gmail.com> | 2021-03-08 12:29:03 +0100 |
---|---|---|
committer | Joffrey Bion <joffrey.bion@gmail.com> | 2021-03-08 12:29:03 +0100 |
commit | 393bc1e746b99f7f54f4447b7291004a5c080b36 (patch) | |
tree | b536ce8a25b6776e5708a7bca0305863ead5ddec /sw-ui | |
parent | Make turnInfo generic in its action type (diff) | |
download | seven-wonders-393bc1e746b99f7f54f4447b7291004a5c080b36.tar.gz seven-wonders-393bc1e746b99f7f54f4447b7291004a5c080b36.tar.bz2 seven-wonders-393bc1e746b99f7f54f4447b7291004a5c080b36.zip |
Remove lobby ID from leave action
Diffstat (limited to 'sw-ui')
-rw-r--r-- | sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/Actions.kt | 2 | ||||
-rw-r--r-- | sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/sagas/Sagas.kt | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/Actions.kt b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/Actions.kt index 9cda6992..6ef52ec6 100644 --- a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/Actions.kt +++ b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/Actions.kt @@ -19,7 +19,7 @@ data class UpdateLobbyAction(val lobby: LobbyDTO) : RAction data class EnterLobbyAction(val lobby: LobbyDTO) : RAction -data class LeaveLobbyAction(val lobbyId: Long) : RAction +object LeaveLobbyAction : RAction data class EnterGameAction(val lobby: LobbyDTO, val turnInfo: PlayerTurnInfo<TurnAction.SayReady>) : RAction diff --git a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/sagas/Sagas.kt b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/sagas/Sagas.kt index d897fa22..13407247 100644 --- a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/sagas/Sagas.kt +++ b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/sagas/Sagas.kt @@ -105,8 +105,8 @@ private fun SwSagaContext.launchApiEventHandlersIn(scope: CoroutineScope, sessio } scope.launch { - session.watchLobbyLeft().collect { leftLobbyId -> - dispatch(LeaveLobbyAction(leftLobbyId)) + session.watchLobbyLeft().collect { + dispatch(LeaveLobbyAction) dispatch(Navigate(Route.GAME_BROWSER)) } } |