77 交友房上麦
This commit is contained in:
@@ -161,7 +161,7 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
|||||||
//设置mqtt环境 false 测试环境 true 正式环境
|
//设置mqtt环境 false 测试环境 true 正式环境
|
||||||
// ExternalResConstants.INSTANCE.setIS_MQTT_RELEASE(false);
|
// ExternalResConstants.INSTANCE.setIS_MQTT_RELEASE(false);
|
||||||
//设置http环境 false 测试环境 true 正式环境
|
//设置http环境 false 测试环境 true 正式环境
|
||||||
ExternalResConstants.INSTANCE.setIS_HTTP_RELEASE(false);
|
ExternalResConstants.INSTANCE.setIS_HTTP_RELEASE(true);
|
||||||
currentEnvironment = ExternalResConstants.INSTANCE.HTTP_PATH();
|
currentEnvironment = ExternalResConstants.INSTANCE.HTTP_PATH();
|
||||||
|
|
||||||
initialization();
|
initialization();
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ open class Application : CommonAppContext() {
|
|||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
// 应用内部存储 filesDir 目录的根路径
|
// 应用内部存储 filesDir 目录的根路径
|
||||||
APP_CONTENT = filesDir.absolutePath
|
APP_CONTENT = File(filesDir, "APP_CONTENT").absolutePath
|
||||||
// 内部存储下的日志目录
|
// 内部存储下的日志目录
|
||||||
LOGUTILS_SAVE_PATH = File(filesDir, "APP_CONTENT/APP_LOG").absolutePath
|
LOGUTILS_SAVE_PATH = File(filesDir, "APP_CONTENT/APP_LOG").absolutePath
|
||||||
// 内部存储下的崩溃日志目录
|
// 内部存储下的崩溃日志目录
|
||||||
|
|||||||
@@ -1735,12 +1735,13 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
} else {
|
} else {
|
||||||
if (roomType == RoomType.DATING && mRoomInfoResp?.room_info?.label_id == "2" && pitNumber.toInt() != 9 && pitNumber.toInt() != 10) {
|
if (roomType == RoomType.DATING && mRoomInfoResp?.room_info?.label_id == "2" && pitNumber.toInt() != 9 && pitNumber.toInt() != 10) {
|
||||||
mRoomInfoResp?.song_pit_list?.add(getPitBean(messageEvent, 1))
|
mRoomInfoResp?.song_pit_list?.add(getPitBean(messageEvent, 1))
|
||||||
if (fromUserInfo.user_id == mRoomInfoResp?.user_info?.user_id){
|
if (fromUserInfo.user_id == mRoomInfoResp?.user_info?.user_id) {
|
||||||
mRoomInfoResp?.user_info?.pit_number = 1
|
mRoomInfoResp?.user_info?.pit_number = 1
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (pitNumber.toInt() - 1 >= 0 && mRoomInfoResp?.room_info?.pit_list != null
|
if (pitNumber.toInt() - 1 >= 0 && mRoomInfoResp?.room_info?.pit_list != null
|
||||||
&& mRoomInfoResp?.room_info?.pit_list!!.size > pitNumber.toInt() - 1) {
|
&& mRoomInfoResp?.room_info?.pit_list!!.size > pitNumber.toInt() - 1
|
||||||
|
) {
|
||||||
mRoomInfoResp?.room_info?.pit_list!![pitNumber.toInt() - 1] =
|
mRoomInfoResp?.room_info?.pit_list!![pitNumber.toInt() - 1] =
|
||||||
getPitBean(messageEvent, 1)
|
getPitBean(messageEvent, 1)
|
||||||
}
|
}
|
||||||
@@ -1783,13 +1784,14 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
mRoomInfoResp?.song_pit_list?.removeIf { roomPitBean ->
|
mRoomInfoResp?.song_pit_list?.removeIf { roomPitBean ->
|
||||||
roomPitBean.user_id.equals(fromUserInfo.user_id.toString())
|
roomPitBean.user_id.equals(fromUserInfo.user_id.toString())
|
||||||
}
|
}
|
||||||
if (mRoomInfoResp?.user_info != null && fromUserInfo.user_id == mRoomInfoResp?.user_info?.user_id){
|
if (mRoomInfoResp?.user_info != null && fromUserInfo.user_id == mRoomInfoResp?.user_info?.user_id) {
|
||||||
mRoomInfoResp?.user_info?.pit_number = 0
|
mRoomInfoResp?.user_info?.pit_number = 0
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (pitNumber.isNotEmpty() && pitNumber.toInt() - 1 >= 0
|
if (pitNumber.isNotEmpty() && pitNumber.toInt() - 1 >= 0
|
||||||
&& mRoomInfoResp?.room_info?.pit_list != null
|
&& mRoomInfoResp?.room_info?.pit_list != null
|
||||||
&& mRoomInfoResp?.room_info?.pit_list!!.size > pitNumber.toInt() - 1) {
|
&& mRoomInfoResp?.room_info?.pit_list!!.size > pitNumber.toInt() - 1
|
||||||
|
) {
|
||||||
mRoomInfoResp?.room_info?.pit_list!![pitNumber.toInt() - 1] =
|
mRoomInfoResp?.room_info?.pit_list!![pitNumber.toInt() - 1] =
|
||||||
RoomPitBean(pitNumber)
|
RoomPitBean(pitNumber)
|
||||||
}
|
}
|
||||||
@@ -2804,6 +2806,14 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
|
|
||||||
//底部麦上按钮显示
|
//底部麦上按钮显示
|
||||||
private fun roomBtnShowIsHide() {
|
private fun roomBtnShowIsHide() {
|
||||||
|
|
||||||
|
//KTV 显示点歌按钮
|
||||||
|
if (RoomType.fromTypeId(mRoomInfoResp?.room_info?.type_id.toString()) == RoomType.DATING
|
||||||
|
&& mRoomInfoResp?.room_info?.label_id.equals("2")) {
|
||||||
|
mBinding?.rlMisc?.visibility = View.VISIBLE
|
||||||
|
} else {
|
||||||
|
mBinding?.rlMisc?.visibility = View.GONE
|
||||||
|
}
|
||||||
//是否在麦上显示状态
|
//是否在麦上显示状态
|
||||||
if (mRoomInfoResp?.user_info?.pit_number != 0) {
|
if (mRoomInfoResp?.user_info?.pit_number != 0) {
|
||||||
maiStatus = false
|
maiStatus = false
|
||||||
@@ -2831,7 +2841,8 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (RoomType.fromTypeId(mRoomInfoResp?.room_info?.type_id) == RoomType.JUKEBOX
|
if (RoomType.fromTypeId(mRoomInfoResp?.room_info?.type_id) == RoomType.JUKEBOX
|
||||||
&& mRoomInfoResp?.singer_info?.song_info?.singer_user_id == mRoomInfoResp?.user_info?.user_id){
|
&& mRoomInfoResp?.singer_info?.song_info?.singer_user_id == mRoomInfoResp?.user_info?.user_id
|
||||||
|
) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1092,8 +1092,8 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
|
|
||||||
/// 推送的下麦1003
|
/// 推送的下麦1003
|
||||||
public void event1003(RoomMessageEvent message) {
|
public void event1003(RoomMessageEvent message) {
|
||||||
int pitNumber = Integer.parseInt(message.getText().getPit_number()) - 1;
|
int pitNumber = Integer.parseInt(message.getText().getPit_number()) ;
|
||||||
RoomPitBean pitBean = roomInfoResp.getRoom_info().getPit_list().get(pitNumber);
|
RoomPitBean pitBean = roomInfoResp.getRoom_info().getPit_list().get(pitNumber- 1);
|
||||||
if (roomInfoRespPk == null || roomInfoRespPk.getPk_info() == null) {
|
if (roomInfoRespPk == null || roomInfoRespPk.getPk_info() == null) {
|
||||||
wheatLayoutSingManager.updateSingleWheat(pitBean, pitNumber);
|
wheatLayoutSingManager.updateSingleWheat(pitBean, pitNumber);
|
||||||
} else {
|
} else {
|
||||||
@@ -1111,8 +1111,8 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
|
|
||||||
/// 1004
|
/// 1004
|
||||||
public void event1004(RoomMessageEvent message) {
|
public void event1004(RoomMessageEvent message) {
|
||||||
int pitNumber = Integer.parseInt(message.getText().getPit_number()) - 1;
|
int pitNumber = Integer.parseInt(message.getText().getPit_number()) ;
|
||||||
RoomPitBean pitBean = roomInfoResp.getRoom_info().getPit_list().get(pitNumber);
|
RoomPitBean pitBean = roomInfoResp.getRoom_info().getPit_list().get(pitNumber- 1);
|
||||||
if (roomInfoRespPk == null || roomInfoRespPk.getPk_info() == null) {
|
if (roomInfoRespPk == null || roomInfoRespPk.getPk_info() == null) {
|
||||||
wheatLayoutSingManager.updateSingleWheat(pitBean, pitNumber);
|
wheatLayoutSingManager.updateSingleWheat(pitBean, pitNumber);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user