遊戲bug修復

This commit is contained in:
18401019693 2023-10-28 17:55:36 +08:00
parent df93b9495a
commit 45372f37b8
2 changed files with 14 additions and 4 deletions

View File

@ -23,6 +23,7 @@ import com.yunbao.common.adapter.SudHomeGameListAdapter;
import com.yunbao.common.bean.CreateSudRoomModel; import com.yunbao.common.bean.CreateSudRoomModel;
import com.yunbao.common.bean.SudRoomListModel; import com.yunbao.common.bean.SudRoomListModel;
import com.yunbao.common.event.LiveSudGamePopupShowOrHideEvent; import com.yunbao.common.event.LiveSudGamePopupShowOrHideEvent;
import com.yunbao.common.event.SudGameListDissMissEvent;
import com.yunbao.common.event.SudRoomListModelEvent; import com.yunbao.common.event.SudRoomListModelEvent;
import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.http.live.LiveNetManager;
@ -53,6 +54,11 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
super(context); super(context);
this.isHome = isHome; this.isHome = isHome;
} }
@Override
public void dismiss() {
Bus.getOff(this);
super.dismiss();
}
@Override @Override
public void buildDialog(XPopup.Builder builder) { public void buildDialog(XPopup.Builder builder) {
@ -72,6 +78,7 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
@Override @Override
protected void onCreate() { protected void onCreate() {
super.onCreate(); super.onCreate();
Bus.getOn(this);
editSearch = findViewById(R.id.edit_search); editSearch = findViewById(R.id.edit_search);
// listHistory = findViewById(R.id.list_history); // listHistory = findViewById(R.id.list_history);
listRoom = findViewById(R.id.list_room); listRoom = findViewById(R.id.list_room);
@ -227,7 +234,10 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
super.onDismiss(); super.onDismiss();
} }
@Subscribe(threadMode = ThreadMode.MAIN)
public void onSudGameListDissMissEvent(SudGameListDissMissEvent event) {
dialog.dismiss();
}
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)
public void onSudGameListEvent(SudRoomListModelEvent event) { public void onSudGameListEvent(SudRoomListModelEvent event) {
CreateSudRoomModel createSudRoomModel = new CreateSudRoomModel(); CreateSudRoomModel createSudRoomModel = new CreateSudRoomModel();
@ -236,8 +246,8 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
createSudRoomModel.setAvatar(event.getModel().getAvatar()); createSudRoomModel.setAvatar(event.getModel().getAvatar());
createSudRoomModel.setRoomName(event.getModel().getRoomName()); createSudRoomModel.setRoomName(event.getModel().getRoomName());
createSudRoomModel.setSudGameName(event.getModel().getSudGameName()); createSudRoomModel.setSudGameName(event.getModel().getSudGameName());
Bus.get().post(new LiveSudGamePopupShowOrHideEvent().setType(0).setCreateSudRoomModel(createSudRoomModel));
dialog.dismiss(); dialog.dismiss();
Bus.get().post(new LiveSudGamePopupShowOrHideEvent().setType(0).setCreateSudRoomModel(createSudRoomModel));
} }
} }

View File

@ -669,7 +669,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
createSudRoomModel.setSudGameRoomId(sudGameDateModel.getSudGameRoomId()); createSudRoomModel.setSudGameRoomId(sudGameDateModel.getSudGameRoomId());
createSudRoomModel.setAvatar(sudGameDateModel.getAvatar()); createSudRoomModel.setAvatar(sudGameDateModel.getAvatar());
createSudRoomModel.setRoomName(sudGameDateModel.getRoomName()); createSudRoomModel.setRoomName(sudGameDateModel.getRoomName());
createSudRoomModel.setSudGameName(sudGameDateModel.getSudGameName()); createSudRoomModel.setSudGameName(sudName);
Bus.get().post(new LiveSudGamePopupShowOrHideEvent().setType(0).setCreateSudRoomModel(createSudRoomModel)); Bus.get().post(new LiveSudGamePopupShowOrHideEvent().setType(0).setCreateSudRoomModel(createSudRoomModel));
} }