From 01c657fdcb0ab243792c50f442de4f76370b9cc5 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Sat, 10 Dec 2022 14:59:21 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E9=9A=8F=E6=9C=BAPK=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=AF=B9=E6=96=B9=E4=B8=BB=E6=92=AD=E6=AD=A3=E5=9C=A8?= =?UTF-8?q?PK=E6=97=B6=E4=B8=8D=E4=BC=9A=E7=BB=A7=E7=BB=AD=E8=B0=83?= =?UTF-8?q?=E7=94=A8next=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/live/activity/LiveRyAnchorActivity.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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 770feab05..6d8b5f321 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java @@ -164,8 +164,8 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl ToastUtil.show("发起随机PK:" + pkUid); JSONObject msg1 = buildLinkMicJSON(); msg1.put("random_pk", "1"); - if(RandomPkManager.getInstance().isRankModel()){ - msg1.put("is_ladders","https://downs.yaoulive.com/rank_top_box.png"); + if (RandomPkManager.getInstance().isRankModel()) { + msg1.put("is_ladders", "https://downs.yaoulive.com/rank_top_box.png"); } linkMicAnchorApply(pkUid, pkUid, msg1.toString()); } @@ -604,7 +604,8 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl fragment.setArguments(bundle); fragment.show(getSupportFragmentManager(), "LiveLinkMicListDialogFragment"); } - public void openFreePkWindow(){ + + public void openFreePkWindow() { FreePkDialogFragment fragment = new FreePkDialogFragment(); Bundle bundle = new Bundle(); fragment.setArguments(bundle); @@ -1075,7 +1076,8 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl JSONObject msg1 = buildLinkMicJSON(); linkMicAnchorApply(pkUid, stream, msg1.toString()); } - public JSONObject buildLinkMicJSON(){ + + public JSONObject buildLinkMicJSON() { JSONObject msg1 = new JSONObject(); msg1.put("uid", CommonAppConfig.getInstance().getUid()); msg1.put("pkuid", CommonAppConfig.getInstance().getUid()); @@ -1122,6 +1124,9 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl } else { ToastUtil.show("主播正在PK,稍後再試"); + if (RandomPkManager.getInstance().isRankModel()) { + RandomPkManager.getInstance().setPkStatus(RandomPkManager.PK_STATUS_REFUSE); + } } } }