1.添加巡乐会房间展示

This commit is contained in:
2025-09-25 16:13:51 +08:00
parent a0ecafbbd7
commit 59eeb1415b
37 changed files with 896 additions and 211 deletions

View File

@@ -110,7 +110,10 @@ public class RoomManager {
public void fetchRoomDataAndEnter(Context context, String roomId, String password) {
// 显示加载提示
// 这里可以根据需要添加加载对话框
if (CommonAppContext.getInstance().isRoomJoininj){
return;
}
CommonAppContext.getInstance().isRoomJoininj=true;
// 检查是否有有效的缓存数据
// RoomInfoResp roomInfo = getCachedRoomData(roomId);
// 检查是否是当前房间且用户在线
@@ -119,6 +122,7 @@ public class RoomManager {
fetchAndJoinRoom(context, roomId, password);
} else {
if (!CommonAppContext.getInstance().playId.equals(roomId)) {
MessageListenerSingleton.getInstance().joinGroup(roomId);
exitRoom(CommonAppContext.getInstance().playId);
} else if (CommonAppContext.getInstance().lable_id.equals("6")) {
upInfo(context, roomId, password, true, null, true);
@@ -241,7 +245,7 @@ public class RoomManager {
*/
private void fetchAndJoinRoom(Context context, String roomId, String password) {
// 获取房间数据
MessageListenerSingleton.getInstance().joinGroup(roomId);
// 等待一段时间确保退出完成
try {
Thread.sleep(300);
@@ -394,11 +398,11 @@ public class RoomManager {
// 可以通过检查Agora是否还在房间中或者通过服务端接口查询用户状态等方式实现
// 目前返回false需要根据实际需求实现具体逻辑
// boolean isCurrentRoom=isCurrentRoom(roomId);
try {
Thread.sleep(300);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
// try {
// Thread.sleep(300);
// } catch (InterruptedException e) {
// Thread.currentThread().interrupt();
// }
final boolean[] isOnline = {false};
RetrofitClient.getInstance().getRoomOnline(roomId, "1", "50", new BaseObserver<RoomOnline>() {
@Override