update 随机PK 修复对方主播正在PK时不会继续调用next接口

This commit is contained in:
zlzw 2022-12-10 14:59:21 +08:00
parent 3a75e24601
commit 01c657fdcb

View File

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