1:取消所有的切换后台、im重连给服务段发送接口
2:修改1058,所有房间添加展示离线
This commit is contained in:
@@ -807,7 +807,7 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
||||
AppLifecycleUtil.onAppFrontGround();
|
||||
}
|
||||
if (playId!=null && !playId.equals("")){
|
||||
RetrofitClient.getInstance().userRoomBack(playId, "2");
|
||||
// RetrofitClient.getInstance().userRoomBack(playId, "2");
|
||||
}
|
||||
activityCount++;
|
||||
}
|
||||
@@ -822,7 +822,7 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
||||
}
|
||||
|
||||
if (playId!=null && !playId.equals("")){
|
||||
RetrofitClient.getInstance().userRoomBack(playId, "1");
|
||||
// RetrofitClient.getInstance().userRoomBack(playId, "1");
|
||||
}
|
||||
|
||||
AppLifecycleUtil.onAppBackGround();
|
||||
|
||||
@@ -36,7 +36,7 @@ public class IMConnectionService extends Service {
|
||||
Log.d(TAG, "IM connect success");
|
||||
if (CommonAppContext.getInstance().playId != null) {
|
||||
LogUtils.e("@@@", ""+CommonAppContext.getInstance().playId);
|
||||
RetrofitClient.getInstance().roomUserReconnect(CommonAppContext.getInstance().playId);
|
||||
// RetrofitClient.getInstance().roomUserReconnect(CommonAppContext.getInstance().playId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,11 +46,10 @@ public class MqttConnect {
|
||||
this.clientId = clientId;
|
||||
|
||||
// 这里是你自己需要订阅的主题
|
||||
shutdown = "qx_room_topic"; // 关机
|
||||
update_app = "qx_xunlehui"; // 发送更新APP
|
||||
// qx_hour_ranking = "qx_hour_ranking";
|
||||
qx_hour_ranking = "qx_hour_ranking";
|
||||
qx_redpacket_arrive = "qx_redpacket_arrive";
|
||||
shutdown = "qx_room_topic"; // 房间飘屏
|
||||
update_app = "qx_xunlehui"; // 巡乐会飘屏
|
||||
qx_hour_ranking = "qx_hour_ranking";//小时榜飘屏
|
||||
qx_redpacket_arrive = "qx_redpacket_arrive"; //红包飘屏的主题
|
||||
|
||||
ArrayList<String> topicList = new ArrayList<>();
|
||||
topicList.add(shutdown);
|
||||
|
||||
@@ -277,7 +277,7 @@ public abstract class BaseMvpActivity<P extends IPresenter, VDB extends ViewData
|
||||
if (CommonAppContext.getInstance().playId != null) {
|
||||
LogUtils.e("@@@", "重连成功");
|
||||
LogUtils.e("@@@", "" + CommonAppContext.getInstance().playId);
|
||||
RetrofitClient.getInstance().roomUserReconnect(CommonAppContext.getInstance().playId);
|
||||
// RetrofitClient.getInstance().roomUserReconnect(CommonAppContext.getInstance().playId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -886,8 +886,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
// 输出当前的播放ID信息
|
||||
LogUtils.e("@@@", "" + CommonAppContext.getInstance().playId)
|
||||
// 调用RetrofitClient执行房间用户重连操作
|
||||
RetrofitClient.getInstance()
|
||||
.roomUserReconnect(CommonAppContext.getInstance().playId)
|
||||
// RetrofitClient.getInstance().roomUserReconnect(CommonAppContext.getInstance().playId)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1434,19 +1433,19 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
LogUtils.e("messageEvent!!.text.type" + messageEvent.text.type)
|
||||
CommonAppContext.getInstance().onlineMap[userId ?: ""] = messageEvent.text.type
|
||||
if (mRoomInfoResp != null && mRoomInfoResp?.room_info != null) {
|
||||
|
||||
when(mRoomInfoResp?.room_info?.type_id) {
|
||||
"1","3","4","8" -> {
|
||||
if (mRoomInfoResp?.room_info?.label_id == "1") {
|
||||
// roomFragment!!.SingSongEvent(messageEvent)
|
||||
} else {
|
||||
roomFragment!!.handleRoomMessage(messageEvent)
|
||||
}
|
||||
}
|
||||
"2","7","9","10" -> {
|
||||
roomFragment!!.handleRoomMessage(messageEvent)
|
||||
}
|
||||
}
|
||||
// when(mRoomInfoResp?.room_info?.type_id) {
|
||||
// "1","3","4","8" -> {
|
||||
// if (mRoomInfoResp?.room_info?.label_id == "1") {
|
||||
//// roomFragment!!.SingSongEvent(messageEvent)
|
||||
// } else {
|
||||
// roomFragment!!.handleRoomMessage(messageEvent)
|
||||
// }
|
||||
// }
|
||||
// "2","7","9","10" -> {
|
||||
// roomFragment!!.handleRoomMessage(messageEvent)
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
CommonAppContext.getInstance().getOnlineMap()
|
||||
|
||||
Reference in New Issue
Block a user