From 45372f37b8b19c7a361cab7ae76ebfe22469a341 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Sat, 28 Oct 2023 17:55:36 +0800 Subject: [PATCH] =?UTF-8?q?=E9=81=8A=E6=88=B2bug=E4=BF=AE=E5=BE=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/dialog/SudGameSearchDialogPopup.java | 16 +++++++++++++--- .../yunbao/live/views/LiveRoomViewHolder.java | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/dialog/SudGameSearchDialogPopup.java b/common/src/main/java/com/yunbao/common/dialog/SudGameSearchDialogPopup.java index 4237c5acf..20b7010c0 100644 --- a/common/src/main/java/com/yunbao/common/dialog/SudGameSearchDialogPopup.java +++ b/common/src/main/java/com/yunbao/common/dialog/SudGameSearchDialogPopup.java @@ -23,6 +23,7 @@ import com.yunbao.common.adapter.SudHomeGameListAdapter; import com.yunbao.common.bean.CreateSudRoomModel; import com.yunbao.common.bean.SudRoomListModel; import com.yunbao.common.event.LiveSudGamePopupShowOrHideEvent; +import com.yunbao.common.event.SudGameListDissMissEvent; import com.yunbao.common.event.SudRoomListModelEvent; import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.live.LiveNetManager; @@ -53,6 +54,11 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow { super(context); this.isHome = isHome; } + @Override + public void dismiss() { + Bus.getOff(this); + super.dismiss(); + } @Override public void buildDialog(XPopup.Builder builder) { @@ -72,6 +78,7 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow { @Override protected void onCreate() { super.onCreate(); + Bus.getOn(this); editSearch = findViewById(R.id.edit_search); // listHistory = findViewById(R.id.list_history); listRoom = findViewById(R.id.list_room); @@ -227,7 +234,10 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow { super.onDismiss(); } - + @Subscribe(threadMode = ThreadMode.MAIN) + public void onSudGameListDissMissEvent(SudGameListDissMissEvent event) { + dialog.dismiss(); + } @Subscribe(threadMode = ThreadMode.MAIN) public void onSudGameListEvent(SudRoomListModelEvent event) { CreateSudRoomModel createSudRoomModel = new CreateSudRoomModel(); @@ -236,8 +246,8 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow { createSudRoomModel.setAvatar(event.getModel().getAvatar()); createSudRoomModel.setRoomName(event.getModel().getRoomName()); createSudRoomModel.setSudGameName(event.getModel().getSudGameName()); - - Bus.get().post(new LiveSudGamePopupShowOrHideEvent().setType(0).setCreateSudRoomModel(createSudRoomModel)); dialog.dismiss(); + Bus.get().post(new LiveSudGamePopupShowOrHideEvent().setType(0).setCreateSudRoomModel(createSudRoomModel)); + } } diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index 3a323f41d..edd4f5943 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -669,7 +669,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis createSudRoomModel.setSudGameRoomId(sudGameDateModel.getSudGameRoomId()); createSudRoomModel.setAvatar(sudGameDateModel.getAvatar()); createSudRoomModel.setRoomName(sudGameDateModel.getRoomName()); - createSudRoomModel.setSudGameName(sudGameDateModel.getSudGameName()); + createSudRoomModel.setSudGameName(sudName); Bus.get().post(new LiveSudGamePopupShowOrHideEvent().setType(0).setCreateSudRoomModel(createSudRoomModel)); }