|
|
@@ -123,29 +123,6 @@ open class JoinController(override val ctx: IRoomContext, serialHandler: Handler
|
|
|
return joiningRoomId != null || joinedRoomInfo != null
|
|
|
}
|
|
|
|
|
|
- override fun joinRoom(req: JoinRoomReq) {
|
|
|
- if (joiningRoomId == req.roomId) {
|
|
|
- Log.i(TAG_ROOM_FLOW, "joinRoom, same room joining, joiningRoomId:${req.roomId}")
|
|
|
- return
|
|
|
- }
|
|
|
- changeRoomState(RoomState.ROOM_JOINING, FlowStateInfo(req.roomId))
|
|
|
- launch {
|
|
|
- when (val result = roomService.joinController.suspendJoinRoom(req)) {
|
|
|
- is Rlt.Success -> {
|
|
|
- Log.i(TAG_ROOM_ENTER_ROOM, "EnterRoomUriInterceptor, join room success, proceed()")
|
|
|
- }
|
|
|
-
|
|
|
- is Rlt.Failed -> {
|
|
|
- Log.e(
|
|
|
- TAG_ROOM_ENTER_ROOM,
|
|
|
- "EnterRoomUriInterceptor, join room fail(${result.error.serverCode}), abort()"
|
|
|
- )
|
|
|
- showToast(result)
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
override suspend fun suspendJoinRoom(req: JoinRoomReq): Rlt<Any> {
|
|
|
Log.d(TAG_ROOM_FLOW, "joinRoom: $req")
|
|
|
return withContext(this.coroutineContext) {
|
|
|
@@ -217,7 +194,9 @@ open class JoinController(override val ctx: IRoomContext, serialHandler: Handler
|
|
|
enterRoomJoinResTime = SystemClock.elapsedRealtime()
|
|
|
if (coroutine.isActive) {
|
|
|
coroutine.resume(
|
|
|
- Rlt.Failed(getError(code, desc))
|
|
|
+ Rlt.Failed(getError(code, desc).apply {
|
|
|
+ data = req.roomId
|
|
|
+ })
|
|
|
)
|
|
|
}
|
|
|
}
|