遊戲bug修復

This commit is contained in:
18401019693 2023-10-28 14:19:11 +08:00
parent f356446c03
commit 86d730cdf1
10 changed files with 47 additions and 21 deletions

View File

@ -19,6 +19,8 @@ public class SudGameDateModel extends BaseModel{
private String roomStatus; private String roomStatus;
@SerializedName("sud_game_name") @SerializedName("sud_game_name")
private String sudGameName; private String sudGameName;
@SerializedName("sud_game_name_en")
private String sud_game_name_en;
@SerializedName("room_name") @SerializedName("room_name")
private String roomName; private String roomName;
@SerializedName("player_total") @SerializedName("player_total")
@ -40,6 +42,15 @@ public class SudGameDateModel extends BaseModel{
return roomHolderId; return roomHolderId;
} }
public String getSud_game_name_en() {
return sud_game_name_en;
}
public SudGameDateModel setSud_game_name_en(String sud_game_name_en) {
this.sud_game_name_en = sud_game_name_en;
return this;
}
public SudGameDateModel setRoomHolderId(String roomHolderId) { public SudGameDateModel setRoomHolderId(String roomHolderId) {
this.roomHolderId = roomHolderId; this.roomHolderId = roomHolderId;
return this; return this;

View File

@ -102,6 +102,7 @@ public class LiveSudGamePopup extends BottomPopupView {
dialog.hide(); dialog.hide();
Bus.get().post(new ShowHideEvent()); Bus.get().post(new ShowHideEvent());
} else { } else {
IMLoginManager.get(getContext()).setSudGameMin();
new XPopup.Builder(getContext()) new XPopup.Builder(getContext())
.asCustom(new HintCustomPopup(getContext(), .asCustom(new HintCustomPopup(getContext(),
getContext().getString(R.string.dialog_tip), getContext().getString(R.string.dialog_tip),
@ -111,7 +112,7 @@ public class LiveSudGamePopup extends BottomPopupView {
.setCallBack(new HintCustomPopup.HintCustomCallBack() { .setCallBack(new HintCustomPopup.HintCustomCallBack() {
@Override @Override
public void onSure() { public void onSure() {
IMLoginManager.get(getContext()).setSudGameMin();
dialog.hide(); dialog.hide();
Bus.get().post(new ShowHideEvent()); Bus.get().post(new ShowHideEvent());
} }

View File

@ -1364,8 +1364,8 @@ Limited ride And limited avatar frame</string>
<string name="choose_a_prank_gift_hint">Enter the prank content...</string> <string name="choose_a_prank_gift_hint">Enter the prank content...</string>
<string name="choose_a_prank_gift_hint2">Input quantity</string> <string name="choose_a_prank_gift_hint2">Input quantity</string>
<string name="sud_in_game">IN GAME</string> <string name="sud_in_game">IN GAME</string>
<string name="currently_in_the_game">You are currently in the game, please return in a timely manner.\\nFailure to return for a long time will be considered a surrender.</string> <string name="currently_in_the_game">You are currently in the game, please return in a timely manner.\n Failure to return for a long time will be considered a surrender. \n During the minimization, it will not be able to switch between live rooms</string>
<string name="the_live_room">Exiting the live room will synchronize with exiting the game room. \\n Do you want to continue</string> <string name="the_live_room">Exiting the live room will synchronize with exiting the game room. \n Do you want to continue</string>
<string name="sud_in_game_minimize">minimize</string> <string name="sud_in_game_minimize">minimize</string>
</resources> </resources>

View File

@ -1360,7 +1360,7 @@
<string name="choose_a_prank_gift_hint">輸入整蠱內容...</string> <string name="choose_a_prank_gift_hint">輸入整蠱內容...</string>
<string name="choose_a_prank_gift_hint2">输入数量</string> <string name="choose_a_prank_gift_hint2">输入数量</string>
<string name="sud_in_game">遊戲中</string> <string name="sud_in_game">遊戲中</string>
<string name="currently_in_the_game">您正在遊戲中,請及時返回 長時間未返回將會視爲認輸哦</string> <string name="currently_in_the_game">若您正在遊戲中,請及時返回\n長時間未返回將會視爲認輸哦\n【最小化期間將無法切換直播間】</string>
<string name="the_live_room">退出直播間將會同步退出遊戲房間 是否继续</string> <string name="the_live_room">退出直播間將會同步退出遊戲房間 是否继续</string>
<string name="sud_in_game_minimize">最小化</string> <string name="sud_in_game_minimize">最小化</string>
</resources> </resources>

View File

@ -1360,7 +1360,7 @@
<string name="choose_a_prank_gift_hint">輸入整蠱內容...</string> <string name="choose_a_prank_gift_hint">輸入整蠱內容...</string>
<string name="choose_a_prank_gift_hint2">输入数量</string> <string name="choose_a_prank_gift_hint2">输入数量</string>
<string name="sud_in_game">遊戲中</string> <string name="sud_in_game">遊戲中</string>
<string name="currently_in_the_game">您正在遊戲中,請及時返回\n長時間未返回將會視爲認輸哦</string> <string name="currently_in_the_game">您正在遊戲中,請及時返回\n長時間未返回將會視爲認輸哦\n【最小化期間將無法切換直播間】</string>
<string name="the_live_room">退出直播間將會同步退出遊戲房間\n是否继续</string> <string name="the_live_room">退出直播間將會同步退出遊戲房間\n是否继续</string>
<string name="sud_in_game_minimize">最小化</string> <string name="sud_in_game_minimize">最小化</string>

View File

@ -1366,8 +1366,8 @@ Limited ride And limited avatar frame</string>
<string name="choose_a_prank_gift">Choose a prank gift</string> <string name="choose_a_prank_gift">Choose a prank gift</string>
<string name="choose_a_prank_gift_hint">Enter the prank content...</string> <string name="choose_a_prank_gift_hint">Enter the prank content...</string>
<string name="choose_a_prank_gift_hint2">Input quantity</string> <string name="choose_a_prank_gift_hint2">Input quantity</string>
<string name="currently_in_the_game">You are currently in the game, please return in a timely manner.\\nFailure to return for a long time will be considered a surrender.</string> <string name="currently_in_the_game">You are currently in the game, please return in a timely manner.\n Failure to return for a long time will be considered a surrender. \n During the minimization, it will not be able to switch between live rooms</string>
<string name="the_live_room">Exiting the live room will synchronize with exiting the game room. \\n Do you want to continue</string> <string name="the_live_room">Exiting the live room will synchronize with exiting the game room. \ n Do you want to continue</string>
<string name="sud_in_game">IN GAME</string> <string name="sud_in_game">IN GAME</string>
<string name="sud_in_game_minimize">minimize</string> <string name="sud_in_game_minimize">minimize</string>
</resources> </resources>

View File

@ -53,6 +53,7 @@ import com.yunbao.common.dialog.NotCancelableDialog;
import com.yunbao.common.event.GiftWallIlluminateEvent; import com.yunbao.common.event.GiftWallIlluminateEvent;
import com.yunbao.common.event.LoginInvalidEvent; import com.yunbao.common.event.LoginInvalidEvent;
import com.yunbao.common.event.SendBlindGiftEvent; import com.yunbao.common.event.SendBlindGiftEvent;
import com.yunbao.common.event.ShowHideEvent;
import com.yunbao.common.http.CommonHttpConsts; import com.yunbao.common.http.CommonHttpConsts;
import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.http.CommonHttpUtil;
import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.HttpCallback;
@ -1705,6 +1706,14 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
} }
} }
@Subscribe(threadMode = ThreadMode.MAIN)
public void onShowHideEvent(ShowHideEvent event) {
if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.onShowHideEvent();
}
}
/** /**
* 检查指定直播间连麦人数 * 检查指定直播间连麦人数
* *

View File

@ -754,7 +754,7 @@ public class SocketRyClient {
case "SudGameCreateRoom": case "SudGameCreateRoom":
Bus.get().post(new LiveAudienceEvent() Bus.get().post(new LiveAudienceEvent()
.setType(LiveAudienceEvent.LiveAudienceType.SUD_GAME_CREATE_ROOM) .setType(LiveAudienceEvent.LiveAudienceType.SUD_GAME_CREATE_ROOM)
.setAvatar(map.getString("sud_game_name")) .setAvatar(WordUtil.isNewZh()?map.getString("sud_game_name"):map.getString("sud_game_name_en"))
.setCreateSudRoomModel(GsonUtils.fromJson(map.toString(), SudGameDateModel.class))); .setCreateSudRoomModel(GsonUtils.fromJson(map.toString(), SudGameDateModel.class)));
break; break;

View File

@ -660,6 +660,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
ViewClicksAntiShake.clicksAntiShake(sud_layout_name, new ViewClicksAntiShake.ViewClicksCallBack() { ViewClicksAntiShake.clicksAntiShake(sud_layout_name, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override @Override
public void onViewClicks() { public void onViewClicks() {
if (getsudGameMin()) {
ToastUtil.show(WordUtil.isNewZh() ? "小遊戲進行中" : "Game in progress");
} else {
CreateSudRoomModel createSudRoomModel = new CreateSudRoomModel(); CreateSudRoomModel createSudRoomModel = new CreateSudRoomModel();
createSudRoomModel.setSudGameId(sudGameDateModel.getSudGameId()); createSudRoomModel.setSudGameId(sudGameDateModel.getSudGameId());
createSudRoomModel.setSudGameRoomId(sudGameDateModel.getSudGameRoomId()); createSudRoomModel.setSudGameRoomId(sudGameDateModel.getSudGameRoomId());
@ -673,6 +676,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
.asCustom(new LiveSudGamePopup(mContext, createSudRoomModel)) .asCustom(new LiveSudGamePopup(mContext, createSudRoomModel))
.show(); .show();
} }
}
}); });
sudNameHandler.removeCallbacks(sudNameRunnable); sudNameHandler.removeCallbacks(sudNameRunnable);
sudNameHandler.postDelayed(sudNameRunnable, 10000); sudNameHandler.postDelayed(sudNameRunnable, 10000);

View File

@ -723,7 +723,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
mLiveRoomViewHolder.hindeRedPacket(); mLiveRoomViewHolder.hindeRedPacket();
} }
if (TextUtils.equals(data.getSudGameRoomStatus(), "1")) { if (TextUtils.equals(data.getSudGameRoomStatus(), "1")) {
mLiveRoomViewHolder.setSudName(data.getSudGameDateModel().getSudGameName(), data.getSudGameDateModel()); mLiveRoomViewHolder.setSudName(WordUtil.isNewZh() ? data.getSudGameDateModel().getSudGameName() : data.getSudGameDateModel().getSud_game_name_en(), data.getSudGameDateModel());
} }
} }