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)); }