fix bugs 1.
This commit is contained in:
@@ -1486,7 +1486,7 @@ 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!!)
|
||||
roomBtnShowIsHide(mRoomInfoResp?.singer_info?.song_info?.singer_user_id!!)
|
||||
} else {
|
||||
mRoomInfoResp?.singer_info?.song_info = null
|
||||
roomBtnShowIsHide(-1)
|
||||
@@ -1835,7 +1835,11 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
}
|
||||
|
||||
2 -> {
|
||||
mRoomInfoResp?.user_info?.pit_number = 0
|
||||
if (mRoomInfoResp?.room_info?.pit_list!![0].user_id.equals(mRoomInfoResp?.user_info?.user_id.toString())) {
|
||||
mRoomInfoResp?.user_info?.pit_number = 9
|
||||
}else{
|
||||
mRoomInfoResp?.user_info?.pit_number = 0
|
||||
}
|
||||
mRoomInfoResp?.room_auction = RoomAuction()
|
||||
}
|
||||
}
|
||||
@@ -1867,16 +1871,17 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
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){
|
||||
if (mRoomInfoResp?.room_info?.pit_list!![0].user_id.equals(mRoomInfoResp?.user_info?.user_id.toString())) {
|
||||
userId = -1
|
||||
}else{
|
||||
userId = auction.user_id.toInt()
|
||||
}
|
||||
mRoomInfoResp?.user_info?.pit_number = 1
|
||||
|
||||
roomBtnShowIsHide(userId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
mRoomInfoResp?.room_auction?.auction_list = ArrayList()
|
||||
}
|
||||
@@ -1885,7 +1890,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
roomFragment!!.upRoomInfoData(mRoomInfoResp)
|
||||
roomFragment!!.handleRoomMessage(messageEvent)
|
||||
|
||||
roomBtnShowIsHide(userId)
|
||||
}
|
||||
|
||||
private fun handleMsgType1020(messageEvent: RoomMessageEvent, text: T?) {
|
||||
@@ -2878,9 +2882,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
|
||||
if (userId == 0) {
|
||||
switchMic(2)
|
||||
}
|
||||
|
||||
if (mRoomInfoResp?.user_info?.user_id == userId) {
|
||||
}else if (mRoomInfoResp?.user_info?.user_id == userId) {
|
||||
switchMic(2)
|
||||
}
|
||||
} else {
|
||||
@@ -2902,7 +2904,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
}
|
||||
maiStatus = true
|
||||
mBinding!!.ivWheatFeeding.setImageResource(com.xscm.moduleutil.R.mipmap.room_wheat_feeding)
|
||||
if (mRoomInfoResp?.user_info?.user_id == SpUtil.getUserId()) {
|
||||
if (mRoomInfoResp?.user_info?.user_id == userId) {
|
||||
switchMic(2)
|
||||
}
|
||||
setVoiveState(maiStatus)
|
||||
|
||||
Reference in New Issue
Block a user