roomBean = null

This commit is contained in:
2025-11-19 10:37:31 +08:00
parent 45923ae858
commit 1fdcab95f6
2 changed files with 10 additions and 10 deletions

View File

@@ -161,7 +161,7 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
//设置mqtt环境 false 测试环境 true 正式环境
// ExternalResConstants.INSTANCE.setIS_MQTT_RELEASE(false);
//设置http环境 false 测试环境 true 正式环境
ExternalResConstants.INSTANCE.setIS_HTTP_RELEASE(true);
ExternalResConstants.INSTANCE.setIS_HTTP_RELEASE(false);
currentEnvironment = ExternalResConstants.INSTANCE.HTTP_PATH();

View File

@@ -194,7 +194,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
RoomContacts.View, PermissionCallbacks, OnMessageReceivedListener,
QXRedPacketManager.QXRedPacketManagerDelegate {
private var roomFragment: RoomFragment? = null
private var mRoomBean: RoomBean? = null
//房主信息
private var mRoomOwnerBean: RoomOwnerBean? = null
@@ -894,7 +893,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
AppStateManager.getInstance().roomInfo = resp
this.mRoomInfoResp = resp
val roomBean = resp.room_info
this.mRoomBean = roomBean
LogUtils.e("setView_mRoomBean", roomBean.toString())
this.mRoomUserBean = resp.user_info
this.mRoomOwnerBean = resp.room_owner
this.roomId = roomBean.room_id
@@ -933,7 +932,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
}
CommonAppContext.getInstance().isPlaying = true
CommonAppContext.getInstance().playId = roomId
CommonAppContext.getInstance().playName = mRoomBean!!.room_name
CommonAppContext.getInstance().playName = mRoomInfoResp?.room_info?.room_name
CommonAppContext.getInstance().playCover = resp.room_info.room_cover
CommonAppContext.getInstance().showSelf = resp.is_show_self == 1
@@ -1602,8 +1601,8 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
roomSettingEvent.room_up_pit_type = text.room_up_pit_type
roomSettingEvent.type = messageEvent.msgType
mRoomBean?.room_up_pit_type = text.room_up_pit_type.toString() + ""
EventBus.getDefault().post(mRoomBean)
mRoomInfoResp?.room_info?.room_up_pit_type = text.room_up_pit_type.toString() + ""
EventBus.getDefault().post(mRoomInfoResp?.room_info)
EventBus.getDefault().post(roomSettingEvent)
}
@@ -1856,9 +1855,10 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
private fun handleMsgType1020(messageEvent: RoomMessageEvent, text: T?) {
if (text == null) return
mRoomBean = text.roomInfo
EventBus.getDefault().post(mRoomBean)
changeBackgroundColor(mRoomBean?.room_background)
mRoomInfoResp?.room_info = text.roomInfo
LogUtils.e("1020_mRoomBean", mRoomInfoResp?.room_info.toString())
EventBus.getDefault().post(mRoomInfoResp?.room_info)
changeBackgroundColor(mRoomInfoResp?.room_info?.room_background)
}
private fun handleMsgType1011(messageEvent: RoomMessageEvent, text: T?) {
@@ -2394,7 +2394,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
} else if (id == R.id.btn_notice) {
val roomNoticeDialogFragment = RoomNoticeDialogFragment(this)
roomNoticeDialogFragment.setTitle("公告")
roomNoticeDialogFragment.setContent(mRoomBean!!.room_intro)
roomNoticeDialogFragment.setContent(mRoomInfoResp?.room_info?.room_intro)
roomNoticeDialogFragment.show()
addActiveDialog(roomNoticeDialogFragment)
} else if (id == R.id.btn_ranking) { //排行榜