fix: 修复bug

This commit is contained in:
eggmanQQQ
2024-11-13 17:11:20 +08:00
parent f5aa8ec8f1
commit 463855cf92
4 changed files with 68 additions and 56 deletions

View File

@@ -1512,6 +1512,23 @@ public final class IMNetEaseManager {
case ROOM_BG_CHANGE_FIRST:
RoomBgChangeMsgAttachment roomBgChangeMsgAttachment = (RoomBgChangeMsgAttachment) attachment;
// 针对房间最小化时的处理
if (AvRoomDataManager.get().mCurrentRoomInfo != null && !AvRoomDataManager.get().hasAvRoomAct) {
String fromAccount = msg.getFromAccount();
String sessionId = msg.getSessionId();
String roomUid = String.valueOf(AvRoomDataManager.get().mCurrentRoomInfo.getUid());
String roomId = String.valueOf(AvRoomDataManager.get().mCurrentRoomInfo.getRoomId());
if (fromAccount !=null && fromAccount.equals(roomUid)){
if (sessionId != null && sessionId.equals(roomId)) {
if (roomBgChangeMsgAttachment.bgChangeBean != null && roomBgChangeMsgAttachment.bgChangeBean.url!=null) {
AvRoomDataManager.get().mCurrentRoomInfo.setBackPic(roomBgChangeMsgAttachment.bgChangeBean.url);
}
}
}
}
IMNetEaseManager.get().getChatRoomEventObservable().onNext(new RoomEvent()
.setEvent(RoomEvent.MSG_ROOM_BG_CHANGE)
.setRoomBgChangeBean(roomBgChangeMsgAttachment.bgChangeBean));