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