Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruce0203 committed Aug 4, 2023
1 parent ad79948 commit 33f6257
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions client/src/commonMain/kotlin/ui/waitingRoom.kt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ suspend fun waitingRoom(room: UUID) {
onUpAnywhere {
if (isDone) return@onUpAnywhere
isDone = true
leaveRoom(sessionUUID)
waitingRoom.removeFromParent()
MainMenuState().mainMenu()
}
Expand Down
2 changes: 2 additions & 0 deletions shared/src/commonMain/kotlin/network/ViewedRoom.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ suspend fun getViewedRooms() = runCatching {

suspend fun joinRoom(uuid: UUID) = sendHttp("rooms/join", uuid).status

suspend fun leaveRoom(uuid: UUID) = sendHttp("rooms/leave", uuid).status

suspend fun getRoomName(uuid: UUID) = sendHttp("rooms/name", uuid).body<String>()

0 comments on commit 33f6257

Please sign in to comment.