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

View File

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

View File

@ -703,7 +703,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
}
});
LivePushRyViewHolder.btn_close.setVisibility(View.VISIBLE);
LiveRyAnchorActivity.isDRPK=1;
ScreenDimenUtil util = ScreenDimenUtil.getInstance();
int mScreenWdith = util.getScreenWdith();
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.setVisibility(View.VISIBLE);
LivePushRyViewHolder.btn_close.setVisibility(View.VISIBLE);
LiveRyAnchorActivity.isDRPK=1;
JSONObject msg1 = new JSONObject();
msg1.put("uid", CommonAppConfig.getInstance().getUid());

View File

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