From c592da4d554359dc376631ccda0e2fdc6b312251 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=A2=81=E5=B0=8F=E6=B1=9F?= <461355754@qq.com>
Date: Mon, 10 Nov 2025 14:57:39 +0800
Subject: [PATCH] =?UTF-8?q?1=EF=BC=9A=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86b?=
=?UTF-8?q?ug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.idea/vcs.xml | 2 +-
.../moduleroom/activity/RoomActivity.kt | 46 ++++++++++---------
2 files changed, 25 insertions(+), 23 deletions(-)
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index 73354269..94a25f7f 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/moduleroom/src/main/java/com/example/moduleroom/activity/RoomActivity.kt b/moduleroom/src/main/java/com/example/moduleroom/activity/RoomActivity.kt
index 76bfe92b..c957f2c2 100644
--- a/moduleroom/src/main/java/com/example/moduleroom/activity/RoomActivity.kt
+++ b/moduleroom/src/main/java/com/example/moduleroom/activity/RoomActivity.kt
@@ -108,8 +108,8 @@ import java.util.*
import java.util.stream.Collectors
@Route(path = ARouteConstants.ROOM_DETAILS)
-class RoomActivity : BaseMvpActivity(),
- RoomContacts.View, PermissionCallbacks, OnMessageReceivedListener, QXRedPacketManager.QXRedPacketManagerDelegate {
+class RoomActivity : BaseMvpActivity(), RoomContacts.View, PermissionCallbacks,
+ OnMessageReceivedListener, QXRedPacketManager.QXRedPacketManagerDelegate {
private var roomFragment: RoomFragment? = null
var commonPageAdapter: CommonPageAdapter? = null
private var mRoomBean: RoomBean? = null
@@ -1184,7 +1184,7 @@ class RoomActivity : BaseMvpActivity(),
override fun initData() {
if (!EasyPermissions.hasPermissions(this, *permissions)) {
- PermissionDescriptionHelper.addPermissionDescription(false,mBinding?.root as ViewGroup,permissions)
+ PermissionDescriptionHelper.addPermissionDescription(false, mBinding?.root as ViewGroup, permissions)
EasyPermissions.requestPermissions(
this, "请开启录音使用权限",
1, *permissions
@@ -1702,9 +1702,10 @@ class RoomActivity : BaseMvpActivity(),
toPitNumber: String,
messageEvent: RoomMessageEvent
) {
- mRoomInfoResp!!.user_info.pit_number = Integer.parseInt(toPitNumber)
- if ("9" == toPitNumber && messageEvent.text.user_id.equals(SpUtil.getUserId().toString())) {
+ if ("9" == toPitNumber && messageEvent.text.fromUserInfo.user_id == SpUtil.getUserId()) {
+ mRoomInfoResp!!.user_info.pit_number = Integer.parseInt(toPitNumber)
+
mBinding!!.roomTop.rl.visibility = View.VISIBLE
ivSoundEffects(true)
} else {
@@ -1740,6 +1741,7 @@ class RoomActivity : BaseMvpActivity(),
if (mRoomInfoResp!!.user_info.pit_number == 9) {
mBinding!!.roomTop.rl.visibility = View.VISIBLE
ivSoundEffects(true)
+ setRoleType(3, 9)
}
}
@@ -1943,9 +1945,8 @@ class RoomActivity : BaseMvpActivity(),
aBoolean = true
ivWheatFeeding(com.xscm.moduleutil.R.mipmap.room_wheat_feeding)
setBoolean(aBoolean)
- if (mRoomInfoResp!!.user_info != null) {
- mRoomInfoResp!!.user_info.pit_number = 0
- }
+
+ mRoomInfoResp?.user_info?.pit_number = 0
setRoleType(0, 0)
switchMic(2)
}
@@ -1969,9 +1970,9 @@ class RoomActivity : BaseMvpActivity(),
if ("9" == pitNumber) {
if (userId == currentUserId) {
mRoomInfoResp!!.room_info.pit_list[0] = getPitBean2(messageEvent, "9")
- if (mRoomInfoResp!!.user_info != null) {
- mRoomInfoResp!!.user_info.pit_number = 0
- }
+// if (mRoomInfoResp!!.user_info != null) {
+// mRoomInfoResp!!.user_info.pit_number = 0
+// }
}
} else if ("888" == pitNumber) {
mRoomInfoResp!!.room_auction = null
@@ -2658,13 +2659,13 @@ class RoomActivity : BaseMvpActivity(),
// if (mRoomInfoResp!!.room_info.label_id == "1") {
// queren()
// } else {
- val fragment = RequestDialogFragment.show(
- roomId, mRoomInfoResp, 1,
- supportFragmentManager
- )
- if (fragment != null) {
- addActiveDialogFragment(fragment) // 添加到管理列表
- }
+ val fragment = RequestDialogFragment.show(
+ roomId, mRoomInfoResp, 1,
+ supportFragmentManager
+ )
+ if (fragment != null) {
+ addActiveDialogFragment(fragment) // 添加到管理列表
+ }
// }
} else if (id == R.id.rl_gift) { //礼物
// RoomGiftDialogFragment.show(mRoomInfoResp, null, roomId, 0, "", getSupportFragmentManager());
@@ -2916,7 +2917,7 @@ class RoomActivity : BaseMvpActivity(),
*
* @param type
*/
- // @Override
+// @Override
fun switchMic(type: Int) {
if (type == 1) {
mBinding!!.ivMic.setImageResource(com.xscm.moduleutil.R.mipmap.room_microphone)
@@ -3078,14 +3079,17 @@ class RoomActivity : BaseMvpActivity(),
switchMic(2) // 关闭麦克风
}
}
+
pit_number == 888 -> {
rl_mic?.visibility = View.VISIBLE
switchMic(2) // 关闭麦克风
}
+
pit_number == -1 -> {
rl_mic?.visibility = View.VISIBLE
switchMic(1) // 打开麦克风
}
+
else -> {
rl_mic?.visibility = View.GONE
switchMic(2) // 关闭麦克风
@@ -3102,7 +3106,7 @@ class RoomActivity : BaseMvpActivity(),
if ("1" != typeId) {
rl_more?.visibility = View.GONE
}
- if ("1"==typeId && "2" == labelId){
+ if ("1" == typeId && "2" == labelId) {
rl_misc?.visibility = View.VISIBLE
}
}
@@ -4565,6 +4569,4 @@ class RoomActivity : BaseMvpActivity(),
}
}
}
-
-
}
\ No newline at end of file