From f359c9994daf4c6217ef65f8eb43b906fcd93065 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Wed, 14 Dec 2022 17:25:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DPK=E8=BF=87=E7=A8=8B=E4=B8=AD?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E5=86=8D=E6=AC=A1=E6=89=93=E5=BC=80PK?= =?UTF-8?q?=E5=AF=B9=E8=AF=9D=E6=A1=86=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/live/activity/LiveRyAnchorActivity.java | 14 +++++++++++--- .../yunbao/live/dialog/RandomPkDialogFragment.java | 4 ++-- .../live/presenter/LiveRyLinkMicPkPresenter.java | 3 ++- .../yunbao/live/views/LivePushRyViewHolder.java | 2 +- 4 files changed, 16 insertions(+), 7 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 a951c8f14..79cfbfd92 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java @@ -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(); diff --git a/live/src/main/java/com/yunbao/live/dialog/RandomPkDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/RandomPkDialogFragment.java index aaae1d485..a8552e9aa 100644 --- a/live/src/main/java/com/yunbao/live/dialog/RandomPkDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/RandomPkDialogFragment.java @@ -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() { diff --git a/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java b/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java index a79ba318b..370ce2659 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java @@ -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()); diff --git a/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java b/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java index 1caa73c35..332a17a85 100644 --- a/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java @@ -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