1:修改师父标签

2:修改签约房的清除魅力我更新魅力
This commit is contained in:
2025-12-01 15:35:22 +08:00
parent 49e345db2c
commit e925a0c2a5
10 changed files with 99 additions and 23 deletions

View File

@@ -2161,7 +2161,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
val typeId = mRoomInfoResp?.room_info?.type_id
if ("2" == typeId) {
roomFragment!!.handleRoomMessage(messageEvent)
} else if ("1" == typeId || "4" == typeId || "3" == typeId || "8" == typeId || "9" == typeId) {
} else if ("1" == typeId || "4" == typeId || "3" == typeId || "8" == typeId || "9" == typeId || "10" == typeId) {
val labelId = mRoomInfoResp!!.room_info.label_id
if ("2" == labelId) {
roomFragment!!.handleRoomMessage(messageEvent)

View File

@@ -533,6 +533,7 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
((RoomActivity) getActivity()).upRoomInfo(mRoomInfoResp);
}
}
//误导
public void updateSeatViewExchangedWithPitArray(RoomInfoResp roomInfoResp) {
mRoomInfoResp = roomInfoResp;
@@ -540,6 +541,7 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
loadSubFragment(qxRoomSeatViewType);
updateChildFragmentViews();
}
//1003 1004
public void upRoomInfoData(RoomInfoResp roomInfoResp) {
this.mRoomInfoResp = roomInfoResp;
@@ -910,11 +912,12 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
if (roomJukeboxFragment != null) {
handleJukeboxEvent(messageEvent);
}
break;
case SIGNCONTRACT:
if (mentorShipFragment != null) {
handleMentorshipEvent(messageEvent);
}
break;
case CABIN:
break;
default:
@@ -936,7 +939,13 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
mentorShipFragment.event1035(messageEvent);
break;
case 1059:
mentorShipFragment.event1039(messageEvent);
mentorShipFragment.event1059(messageEvent);
break;
case 1005:
mentorShipFragment.event1005(messageEvent);
break;
case 1021:
mentorShipFragment.event1021(messageEvent);
break;
case EMMessageInfo.QXRoomMessageTypeSignStartText:
mentorShipFragment.event1090(messageEvent);

View File

@@ -21,6 +21,7 @@ import com.xscm.modulemain.utils.CountdownTimer
import com.xscm.modulemain.widget.RoomMentorShipWheatView
import com.xscm.moduleutil.base.BaseMvpFragment
import com.xscm.moduleutil.bean.RoomMessageEvent
import com.xscm.moduleutil.bean.UserInfo
import com.xscm.moduleutil.bean.WalletBean
import com.xscm.moduleutil.bean.room.RoomInfoResp
import com.xscm.moduleutil.bean.room.RoomPitBean
@@ -442,8 +443,15 @@ class RoomMentorShipFragment(var mRoomInfo: RoomInfoResp?) :
}
fun event1039(messageEvent: RoomMessageEvent) {
// TODO: 清除个人魅力
fun event1059(messageEvent: RoomMessageEvent) {
val userId: String? = messageEvent.text.user_id
if (mBinding.rmsw1.getUserId() != null && mBinding.rmsw1.getUserId().equals(userId)) {
mBinding.rmsw1.setCharm("0")
}
if (mBinding.rmswMidd.getUserId() != null && mBinding.rmswMidd.getUserId().equals(userId)) {
mBinding.rmswMidd.setCharm("0")
}
}
@@ -561,5 +569,43 @@ class RoomMentorShipFragment(var mRoomInfo: RoomInfoResp?) :
scope.cancel()
}
fun event1005(message: RoomMessageEvent) {
// 检查是否有多个用户信息
if (message.text.toUserInfos != null && !message.text.toUserInfos.isEmpty()
) {
// 处理多个用户的情况
for (userOnlineStatusBean in message.text.toUserInfos) {
updateCharmForUser(userOnlineStatusBean)
}
} else {
// 处理单个用户的情况
val toUserInfo: UserInfo? = message.text.toUserInfo
if (toUserInfo != null) {
updateCharmForUser(toUserInfo)
}
}
}
private fun updateCharmForUser(userInfo: UserInfo) {
val userId = userInfo.user_id.toString()
val charm = userInfo.charm
if (mBinding.rmsw1.getUserId() != null && mBinding.rmsw1.getUserId().equals(userId)) {
mBinding.rmsw1.setCharm(charm)
}
if(mBinding.rmswMidd.userId!=null && mBinding.rmswMidd.userId.equals(userId)){
mBinding.rmswMidd.setCharm(charm)
}
}
// TODO: 清除房间的魅力,一键全清
fun event1021(messageEvent: RoomMessageEvent) {
if (mBinding.rmsw1.userId.isNotEmpty()) {
mBinding.rmsw1.setCharm("0")
}
if (mBinding.rmswMidd.userId.isNotEmpty()) {
mBinding.rmswMidd.setCharm("0")
}
}
}