DoggyZhang há 5 dias atrás
pai
commit
a2e65f0dec

+ 0 - 1
module/room/src/main/java/com/adealink/weparty/room/gift/viewmodel/RoomGiftViewModel.kt

@@ -24,7 +24,6 @@ class RoomGiftViewModel : BaseViewModel() {
                 roomService.messageController.notificationsFlow.map { notifications ->
                     notifications.mapNotNull { if (it.content is SendGiftNotificationContent) it else null }
                 }.distinctUntilChanged().collect { notifications ->
-                    Log.d("zhangfei", "RoomGiftViewModel, ${notifications.joinToString(separator = ",") { it.barrage.sequence.toString() }}")
                     notifySendGift(notifications)
                 }
             }

+ 0 - 2
module/room/src/main/java/com/adealink/weparty/room/sdk/controller/IJoinController.kt

@@ -26,8 +26,6 @@ interface IJoinController<L : IJoinListener> : IController<L> {
      */
     fun isRoomJoiningOrJoined(): Boolean
 
-    fun joinRoom(req: JoinRoomReq)
-
     suspend fun suspendJoinRoom(req: JoinRoomReq): Rlt<Any>
 
     /**

+ 3 - 24
module/room/src/main/java/com/adealink/weparty/room/sdk/controller/impl/JoinController.kt

@@ -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
+                            })
                         )
                     }
                 }

+ 0 - 2
module/room/src/main/java/com/adealink/weparty/room/sdk/controller/impl/MessageController.kt

@@ -90,8 +90,6 @@ class MessageController(override val ctx: IRoomContext, serialHandler: Handler)
 
     private fun handleNotifications(notifications: List<Notification>) {
         val oldNotifications = _oldNotificationFlow.value
-        Log.d("zhangfei", "handleNotifications, ${notifications.joinToString(separator = ",") { it.barrage.sequence.toString() }}")
-        Log.d("zhangfei", "   oldNotifications, ${oldNotifications.joinToString(separator = ",") { it.barrage.sequence.toString() }}")
         val lastNotification = oldNotifications.lastOrNull()
         if (lastNotification != null) {
             val lastIndex = notifications.indexOfLast { it.barrage.sequence == lastNotification.barrage.sequence }

+ 1 - 0
module/room/src/main/res/layout/dialog_room_member.xml

@@ -88,6 +88,7 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginTop="20dp"
+            app:layout_goneMarginTop="10dp"
             app:layout_constraintEnd_toEndOf="parent"
             app:layout_constraintStart_toStartOf="parent"
             app:layout_constraintTop_toBottomOf="@id/v_playmate" />

+ 1 - 1
module/room/src/main/res/layout/layout_room_member_playmate_category_item.xml

@@ -3,7 +3,7 @@
     xmlns:app="http://schemas.android.com/apk/res-auto"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="170dp"
-    android:layout_height="56dp"
+    android:layout_height="68dp"
     android:background="@drawable/room_member_playmate_category_bg"
     android:paddingHorizontal="10dp">