|
|
|
|
@@ -1400,7 +1400,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|
|
|
|
if (msgType == EMMessageInfo.QXRoomMessageTypeRoomPKEnd
|
|
|
|
|
|| msgType == EMMessageInfo.QXRoomMessageTypeRoomPKDisconnect
|
|
|
|
|
) {
|
|
|
|
|
roomBtnShowIsHide()
|
|
|
|
|
roomBtnShowIsHide(-1)
|
|
|
|
|
}
|
|
|
|
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeMuteRemoteAudio) {//pk 关闭对方麦
|
|
|
|
|
handleMsgType125(messageEvent, text.text)
|
|
|
|
|
@@ -1473,7 +1473,10 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|
|
|
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeQXRoomMessageRed) {
|
|
|
|
|
qxRedPacketManager!!.addRedPacket(roomId, messageEvent.text.redpacketInfo)
|
|
|
|
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeQXRoomMessageRedRemove) {
|
|
|
|
|
qxRedPacketManager!!.removeRedPacket(EMMessageInfo.QXRoomMessageTypeQXRoomMessageRedRemove,messageEvent.text.redpacket_id)
|
|
|
|
|
qxRedPacketManager!!.removeRedPacket(
|
|
|
|
|
EMMessageInfo.QXRoomMessageTypeQXRoomMessageRedRemove,
|
|
|
|
|
messageEvent.text.redpacket_id
|
|
|
|
|
)
|
|
|
|
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeSongerNum || //房间点歌数量变化
|
|
|
|
|
msgType == EMMessageInfo.QXRoomMessageTypeSingerRoomNextSongDidChanged
|
|
|
|
|
) //点歌房下一首歌曲发生变化
|
|
|
|
|
@@ -1483,13 +1486,14 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|
|
|
|
if (mRoomInfoResp != null && mRoomInfoResp!!.room_info != null) {
|
|
|
|
|
if (messageEvent?.text?.song_info != null) {
|
|
|
|
|
mRoomInfoResp?.singer_info?.song_info = messageEvent.text.song_info
|
|
|
|
|
roomBtnShowIsHide(mRoomInfoResp?.singer_info?.song_info?.user_id!!)
|
|
|
|
|
} else {
|
|
|
|
|
mRoomInfoResp?.singer_info?.song_info = null
|
|
|
|
|
roomBtnShowIsHide(-1)
|
|
|
|
|
}
|
|
|
|
|
roomFragment?.upRoomInfo(mRoomInfoResp)
|
|
|
|
|
roomFragment!!.handleRoomMessage(messageEvent)
|
|
|
|
|
|
|
|
|
|
roomBtnShowIsHide()
|
|
|
|
|
}
|
|
|
|
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeCPText) {
|
|
|
|
|
LogUtils.e("CPText", messageEvent.text.rights_icon)
|
|
|
|
|
@@ -1512,8 +1516,9 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|
|
|
|
roomFragment?.handleRoomMessage(messageEvent)
|
|
|
|
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeSignTipText) {
|
|
|
|
|
roomFragment?.handleRoomMessage(messageEvent)
|
|
|
|
|
}else if (msgType == EMMessageInfo.QXRoomMessageTypeSignChat) {//暴币展示
|
|
|
|
|
QXGiftPlayerManager.getInstance(this).displayChatEffectView(messageEvent.text.play_image)
|
|
|
|
|
} else if (msgType == EMMessageInfo.QXRoomMessageTypeSignChat) {//暴币展示
|
|
|
|
|
QXGiftPlayerManager.getInstance(this)
|
|
|
|
|
.displayChatEffectView(messageEvent.text.play_image)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1629,7 +1634,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|
|
|
|
roomFragment?.upRoomInfoData(mRoomInfoResp)
|
|
|
|
|
roomFragment!!.handleRoomMessage(messageEvent)
|
|
|
|
|
// 执行换麦逻辑
|
|
|
|
|
roomBtnShowIsHide()
|
|
|
|
|
roomBtnShowIsHide( mRoomInfoResp?.room_info?.pit_list!![toPitNumber.toInt() - 1].user_id.toInt())
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@@ -1675,10 +1680,11 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|
|
|
|
|
|
|
|
|
if (messageEvent.text.songInfo != null) {
|
|
|
|
|
mRoomInfoResp?.song_user_info = messageEvent.text.songInfo
|
|
|
|
|
roomBtnShowIsHide(mRoomInfoResp?.song_user_info?.user_id!!.toInt())
|
|
|
|
|
} else {
|
|
|
|
|
mRoomInfoResp?.song_user_info = null
|
|
|
|
|
mRoomInfoResp?.song_user_info = null
|
|
|
|
|
roomBtnShowIsHide(-1)
|
|
|
|
|
}
|
|
|
|
|
roomBtnShowIsHide()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1765,7 +1771,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|
|
|
|
roomFragment?.upRoomInfoData(mRoomInfoResp)
|
|
|
|
|
roomFragment?.handleRoomMessage(messageEvent)
|
|
|
|
|
|
|
|
|
|
roomBtnShowIsHide()
|
|
|
|
|
roomBtnShowIsHide(fromUserInfo.user_id)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private fun handleMsgType1004(messageEvent: RoomMessageEvent, text: T?) {
|
|
|
|
|
@@ -1811,7 +1817,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|
|
|
|
}
|
|
|
|
|
roomFragment!!.upRoomInfoData(mRoomInfoResp)
|
|
|
|
|
roomFragment?.handleRoomMessage(messageEvent)
|
|
|
|
|
roomBtnShowIsHide()
|
|
|
|
|
roomBtnShowIsHide(fromUserInfo.user_id)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private fun handleMsgType1022(messageEvent: RoomMessageEvent, text: T?) {
|
|
|
|
|
@@ -1836,7 +1842,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|
|
|
|
roomFragment!!.upRoomInfoData(mRoomInfoResp)
|
|
|
|
|
roomFragment!!.handleRoomMessage(messageEvent)
|
|
|
|
|
|
|
|
|
|
roomBtnShowIsHide()
|
|
|
|
|
roomBtnShowIsHide(userId)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private fun handleMsgType1023(messageEvent: RoomMessageEvent, text: T?) {
|
|
|
|
|
@@ -1853,12 +1859,19 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|
|
|
|
if (mRoomInfoResp?.room_auction?.auction_list != null) {
|
|
|
|
|
mRoomInfoResp?.room_auction?.auction_list!!.clear()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var userId = 0
|
|
|
|
|
if (mRoomInfoResp?.room_auction?.auction_list != null && text.auction_list != null) {
|
|
|
|
|
mRoomInfoResp?.room_auction?.auction_list!!.addAll(text.auction_list)
|
|
|
|
|
|
|
|
|
|
mRoomInfoResp?.room_auction?.auction_list?.forEachIndexed { idx, auction ->
|
|
|
|
|
if (idx < 6) {
|
|
|
|
|
if (auction.user_id.equals(mRoomInfoResp?.user_info?.user_id.toString())) {
|
|
|
|
|
if (mRoomInfoResp?.user_info?.pit_number == 9){
|
|
|
|
|
userId = -1
|
|
|
|
|
}else{
|
|
|
|
|
userId = auction.user_id.toInt()
|
|
|
|
|
}
|
|
|
|
|
mRoomInfoResp?.user_info?.pit_number = 1
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@@ -1872,7 +1885,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|
|
|
|
roomFragment!!.upRoomInfoData(mRoomInfoResp)
|
|
|
|
|
roomFragment!!.handleRoomMessage(messageEvent)
|
|
|
|
|
|
|
|
|
|
roomBtnShowIsHide()
|
|
|
|
|
roomBtnShowIsHide(userId)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private fun handleMsgType1020(messageEvent: RoomMessageEvent, text: T?) {
|
|
|
|
|
@@ -2823,10 +2836,11 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//底部麦上按钮显示
|
|
|
|
|
private fun roomBtnShowIsHide() {
|
|
|
|
|
private fun roomBtnShowIsHide(userId: Int = 0) {
|
|
|
|
|
//KTV 显示点歌按钮
|
|
|
|
|
if (RoomType.fromTypeId(mRoomInfoResp?.room_info?.type_id.toString()) == RoomType.DATING
|
|
|
|
|
&& mRoomInfoResp?.room_info?.label_id.equals("2")) {
|
|
|
|
|
&& mRoomInfoResp?.room_info?.label_id.equals("2")
|
|
|
|
|
) {
|
|
|
|
|
mBinding?.rlMisc?.visibility = View.VISIBLE
|
|
|
|
|
} else {
|
|
|
|
|
mBinding?.rlMisc?.visibility = View.GONE
|
|
|
|
|
@@ -2856,12 +2870,20 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|
|
|
|
|
|
|
|
|
if (RoomType.fromTypeId(mRoomInfoResp?.room_info?.type_id.toString()) == RoomType.DATING
|
|
|
|
|
&& mRoomInfoResp?.room_info?.label_id.equals("2")
|
|
|
|
|
&& mRoomInfoResp?.song_user_info?.user_id.equals(mRoomInfoResp?.user_info?.user_id.toString())){
|
|
|
|
|
&& mRoomInfoResp?.song_user_info?.user_id.equals(mRoomInfoResp?.user_info?.user_id.toString())
|
|
|
|
|
) {
|
|
|
|
|
mBinding?.rlMai?.visibility = View.VISIBLE
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
switchMic(2)
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
|
if (userId == 0) {
|
|
|
|
|
switchMic(2)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (mRoomInfoResp?.user_info?.user_id == userId) {
|
|
|
|
|
switchMic(2)
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
mBinding?.ivSoundEffects?.visibility = View.GONE
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
@@ -2873,13 +2895,16 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|
|
|
|
|
|
|
|
|
if (RoomType.fromTypeId(mRoomInfoResp?.room_info?.type_id.toString()) == RoomType.DATING
|
|
|
|
|
&& mRoomInfoResp?.room_info?.label_id.equals("2")
|
|
|
|
|
&& mRoomInfoResp?.song_user_info?.user_id.equals(mRoomInfoResp?.user_info?.user_id.toString())){
|
|
|
|
|
&& mRoomInfoResp?.song_user_info?.user_id.equals(mRoomInfoResp?.user_info?.user_id.toString())
|
|
|
|
|
) {
|
|
|
|
|
mBinding?.rlMai?.visibility = View.VISIBLE
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
maiStatus = true
|
|
|
|
|
mBinding!!.ivWheatFeeding.setImageResource(com.xscm.moduleutil.R.mipmap.room_wheat_feeding)
|
|
|
|
|
switchMic(2)
|
|
|
|
|
if (mRoomInfoResp?.user_info?.user_id == SpUtil.getUserId()) {
|
|
|
|
|
switchMic(2)
|
|
|
|
|
}
|
|
|
|
|
setVoiveState(maiStatus)
|
|
|
|
|
mBinding?.rlMai?.visibility = View.GONE
|
|
|
|
|
mBinding?.ivSoundEffects?.visibility = View.GONE
|
|
|
|
|
@@ -2960,7 +2985,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|
|
|
|
initPublicScreenFragment()
|
|
|
|
|
|
|
|
|
|
MvpPre?.getRoomOnline(roomId, "1", "10")
|
|
|
|
|
LogUtils.e("roomInfo",mRoomInfoResp?.sign_info.toString())
|
|
|
|
|
LogUtils.e("roomInfo", mRoomInfoResp?.sign_info.toString())
|
|
|
|
|
setView(resp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|