From 86d730cdf1a4f14740c09323ac6c8f79fdcd299b Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Sat, 28 Oct 2023 14:19:11 +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 --- .../yunbao/common/bean/SudGameDateModel.java | 11 +++++++ .../yunbao/common/views/LiveSudGamePopup.java | 3 +- common/src/main/res/values-en-rUS/string.xml | 4 +-- common/src/main/res/values-zh-rTW/strings.xml | 2 +- common/src/main/res/values-zh/strings.xml | 2 +- common/src/main/res/values/strings.xml | 4 +-- .../live/activity/LiveRyAnchorActivity.java | 9 ++++++ .../yunbao/live/socket/SocketRyClient.java | 2 +- .../yunbao/live/views/LiveRoomViewHolder.java | 29 +++++++++++-------- .../live/views/PortraitLiveManager.java | 2 +- 10 files changed, 47 insertions(+), 21 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/bean/SudGameDateModel.java b/common/src/main/java/com/yunbao/common/bean/SudGameDateModel.java index eb28839e4..75f8bc9bf 100644 --- a/common/src/main/java/com/yunbao/common/bean/SudGameDateModel.java +++ b/common/src/main/java/com/yunbao/common/bean/SudGameDateModel.java @@ -19,6 +19,8 @@ public class SudGameDateModel extends BaseModel{ private String roomStatus; @SerializedName("sud_game_name") private String sudGameName; + @SerializedName("sud_game_name_en") + private String sud_game_name_en; @SerializedName("room_name") private String roomName; @SerializedName("player_total") @@ -40,6 +42,15 @@ public class SudGameDateModel extends BaseModel{ 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) { this.roomHolderId = roomHolderId; return this; diff --git a/common/src/main/java/com/yunbao/common/views/LiveSudGamePopup.java b/common/src/main/java/com/yunbao/common/views/LiveSudGamePopup.java index 994096b36..7c653f465 100644 --- a/common/src/main/java/com/yunbao/common/views/LiveSudGamePopup.java +++ b/common/src/main/java/com/yunbao/common/views/LiveSudGamePopup.java @@ -102,6 +102,7 @@ public class LiveSudGamePopup extends BottomPopupView { dialog.hide(); Bus.get().post(new ShowHideEvent()); } else { + IMLoginManager.get(getContext()).setSudGameMin(); new XPopup.Builder(getContext()) .asCustom(new HintCustomPopup(getContext(), getContext().getString(R.string.dialog_tip), @@ -111,7 +112,7 @@ public class LiveSudGamePopup extends BottomPopupView { .setCallBack(new HintCustomPopup.HintCustomCallBack() { @Override public void onSure() { - IMLoginManager.get(getContext()).setSudGameMin(); + dialog.hide(); Bus.get().post(new ShowHideEvent()); } diff --git a/common/src/main/res/values-en-rUS/string.xml b/common/src/main/res/values-en-rUS/string.xml index 44f0584a7..a46f1cc00 100644 --- a/common/src/main/res/values-en-rUS/string.xml +++ b/common/src/main/res/values-en-rUS/string.xml @@ -1364,8 +1364,8 @@ Limited ride And limited avatar frame Enter the prank content... Input quantity IN 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. - Exiting the live room will synchronize with exiting the game room. \\n Do you want to continue + 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 + Exiting the live room will synchronize with exiting the game room. \n Do you want to continue minimize diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml index 1e0f295ea..ddc2a7f1d 100644 --- a/common/src/main/res/values-zh-rTW/strings.xml +++ b/common/src/main/res/values-zh-rTW/strings.xml @@ -1360,7 +1360,7 @@ 輸入整蠱內容... 输入数量 遊戲中 - 您正在遊戲中,請及時返回 長時間未返回將會視爲認輸哦 + 若您正在遊戲中,請及時返回\n長時間未返回將會視爲認輸哦\n【最小化期間將無法切換直播間】 退出直播間將會同步退出遊戲房間 是否继续 最小化 diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index 4aba76458..7aba3c2f6 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -1360,7 +1360,7 @@ 輸入整蠱內容... 输入数量 遊戲中 - 您正在遊戲中,請及時返回\n長時間未返回將會視爲認輸哦 + 若您正在遊戲中,請及時返回\n長時間未返回將會視爲認輸哦\n【最小化期間將無法切換直播間】 退出直播間將會同步退出遊戲房間\n是否继续 最小化 diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 2af184fd4..782559550 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -1366,8 +1366,8 @@ Limited ride And limited avatar frame Choose a prank gift Enter the prank content... Input quantity - You are currently in the game, please return in a timely manner.\\nFailure to return for a long time will be considered a surrender. - Exiting the live room will synchronize with exiting the game room. \\n Do you want to continue + 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 + Exiting the live room will synchronize with exiting the game room. \ n Do you want to continue IN GAME minimize diff --git a/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java index 36ed82066..a85fad741 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java @@ -53,6 +53,7 @@ import com.yunbao.common.dialog.NotCancelableDialog; import com.yunbao.common.event.GiftWallIlluminateEvent; import com.yunbao.common.event.LoginInvalidEvent; import com.yunbao.common.event.SendBlindGiftEvent; +import com.yunbao.common.event.ShowHideEvent; import com.yunbao.common.http.CommonHttpConsts; import com.yunbao.common.http.CommonHttpUtil; 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(); + + } + } + /** * 检查指定直播间连麦人数 * diff --git a/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java b/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java index 533b3281a..c4b618153 100644 --- a/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java +++ b/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java @@ -754,7 +754,7 @@ public class SocketRyClient { case "SudGameCreateRoom": Bus.get().post(new LiveAudienceEvent() .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))); break; 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 350f44ae3..0e78bf66b 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -660,18 +660,23 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis ViewClicksAntiShake.clicksAntiShake(sud_layout_name, new ViewClicksAntiShake.ViewClicksCallBack() { @Override public void onViewClicks() { - CreateSudRoomModel createSudRoomModel = new CreateSudRoomModel(); - createSudRoomModel.setSudGameId(sudGameDateModel.getSudGameId()); - createSudRoomModel.setSudGameRoomId(sudGameDateModel.getSudGameRoomId()); - createSudRoomModel.setAvatar(sudGameDateModel.getAvatar()); - createSudRoomModel.setRoomName(sudGameDateModel.getRoomName()); - createSudRoomModel.setSudGameName(sudGameDateModel.getSudGameName()); - new XPopup.Builder(mContext) - .enableDrag(false) - .dismissOnTouchOutside(false) - .dismissOnBackPressed(false) - .asCustom(new LiveSudGamePopup(mContext, createSudRoomModel)) - .show(); + if (getsudGameMin()) { + ToastUtil.show(WordUtil.isNewZh() ? "小遊戲進行中" : "Game in progress"); + } else { + CreateSudRoomModel createSudRoomModel = new CreateSudRoomModel(); + createSudRoomModel.setSudGameId(sudGameDateModel.getSudGameId()); + createSudRoomModel.setSudGameRoomId(sudGameDateModel.getSudGameRoomId()); + createSudRoomModel.setAvatar(sudGameDateModel.getAvatar()); + createSudRoomModel.setRoomName(sudGameDateModel.getRoomName()); + createSudRoomModel.setSudGameName(sudGameDateModel.getSudGameName()); + new XPopup.Builder(mContext) + .enableDrag(false) + .dismissOnTouchOutside(false) + .dismissOnBackPressed(false) + .asCustom(new LiveSudGamePopup(mContext, createSudRoomModel)) + .show(); + } + } }); sudNameHandler.removeCallbacks(sudNameRunnable); diff --git a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java index 74affda03..498c2b59c 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -723,7 +723,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe mLiveRoomViewHolder.hindeRedPacket(); } 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()); } }