修复PK过程中可以再次打开PK对话框的问题

This commit is contained in:
zlzw 2022-12-14 17:25:03 +08:00
parent d49b60a1e1
commit f359c9994d
4 changed files with 16 additions and 7 deletions

View File

@ -289,7 +289,11 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
break; break;
case Constants.LIVE_FUNC_MIC://語音 case Constants.LIVE_FUNC_MIC://語音
//ToastUtil.show("開發中,敬請期待"); //ToastUtil.show("開發中,敬請期待");
openMicWindow(1); if (isDRPK != 1) {
openMicWindow(1);
} else {
ToastUtil.show("您已在PK中");
}
break; break;
case Constants.LIVE_FUNC_DR://多人PK case Constants.LIVE_FUNC_DR://多人PK
if (isDRPK != 1) { if (isDRPK != 1) {
@ -430,7 +434,11 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
} }
break; break;
case Constants.LIVE_FUNC_RANDOM_PK: case Constants.LIVE_FUNC_RANDOM_PK:
openRandomPkWindow(); if (isDRPK != 1) {
openRandomPkWindow();
} else {
ToastUtil.show("您已在PK中");
}
break; break;
default: default:
break; break;
@ -730,7 +738,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
if (mLiveRoomViewHolder != null) { if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.startAnchorLiveTime(); mLiveRoomViewHolder.startAnchorLiveTime();
mLiveRoomViewHolder.startAnchorCheckLive(); mLiveRoomViewHolder.startAnchorCheckLive();
mLiveRoomViewHolder.setAnchorGoodNumber(obj.getString("goodnum")); mLiveRoomViewHolder.setAnchorGoodNumber(obj.getString("goodnum"));
} }
mStartLive = true; mStartLive = true;
mLiveRoomViewHolder.startRefreshUserList(); mLiveRoomViewHolder.startRefreshUserList();

View File

@ -135,7 +135,7 @@ public class RandomPkDialogFragment extends AbsDialogFragment implements View.On
mRandomPkSwitch.setOnClickListener(this); mRandomPkSwitch.setOnClickListener(this);
mPkBtn.setOnClickListener(this); mPkBtn.setOnClickListener(this);
mPkBtn.setTag(false); mPkBtn.setTag(false);
/*mPkBtn.setOnLongClickListener(v -> { mPkBtn.setOnLongClickListener(v -> {
DialogUitl.showSimpleInputDialog(mContext, "输入指定UID", new DialogUitl.SimpleCallback() { DialogUitl.showSimpleInputDialog(mContext, "输入指定UID", new DialogUitl.SimpleCallback() {
@Override @Override
public void onConfirmClick(Dialog dialog, String content) { public void onConfirmClick(Dialog dialog, String content) {
@ -145,7 +145,7 @@ public class RandomPkDialogFragment extends AbsDialogFragment implements View.On
} }
}); });
return false; return false;
});*/ });
} }
private void initData() { private void initData() {

View File

@ -703,7 +703,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
} }
}); });
LivePushRyViewHolder.btn_close.setVisibility(View.VISIBLE); LivePushRyViewHolder.btn_close.setVisibility(View.VISIBLE);
LiveRyAnchorActivity.isDRPK=1;
ScreenDimenUtil util = ScreenDimenUtil.getInstance(); ScreenDimenUtil util = ScreenDimenUtil.getInstance();
int mScreenWdith = util.getScreenWdith(); int mScreenWdith = util.getScreenWdith();
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, mScreenWdith * 720 / 960); LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, mScreenWdith * 720 / 960);
@ -757,6 +757,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
LivePushRyViewHolder.mPreView1.setLayoutParams(params); LivePushRyViewHolder.mPreView1.setLayoutParams(params);
LivePushRyViewHolder.mPreView1.setVisibility(View.VISIBLE); LivePushRyViewHolder.mPreView1.setVisibility(View.VISIBLE);
LivePushRyViewHolder.btn_close.setVisibility(View.VISIBLE); LivePushRyViewHolder.btn_close.setVisibility(View.VISIBLE);
LiveRyAnchorActivity.isDRPK=1;
JSONObject msg1 = new JSONObject(); JSONObject msg1 = new JSONObject();
msg1.put("uid", CommonAppConfig.getInstance().getUid()); msg1.put("uid", CommonAppConfig.getInstance().getUid());

View File

@ -387,7 +387,7 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX
@Override @Override
public void onConfirmClick(Dialog dialog, String content) { public void onConfirmClick(Dialog dialog, String content) {
//断开连麦 //断开连麦
LiveRyAnchorActivity.isDRPK=0;
HttpClient.getInstance().post("livepk.setliveuserout", "livepk.setliveuserout") HttpClient.getInstance().post("livepk.setliveuserout", "livepk.setliveuserout")
.execute(new HttpCallback() { .execute(new HttpCallback() {
@Override @Override