diff options
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)) } } |