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