From 79c730c1b7d791b7825343f09702eb41fc736b48 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Thu, 25 Jul 2024 15:36:11 +0800 Subject: [PATCH] =?UTF-8?q?fix=20PK=E9=82=80=E8=AF=B7=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=9AA=E9=82=80=E8=AF=B7B=EF=BC=8CB=E9=82=80=E8=AF=B7C?= =?UTF-8?q?=EF=BC=8CC=E5=90=8C=E6=84=8FB=EF=BC=8CB=E5=90=8C=E6=84=8FA?= =?UTF-8?q?=EF=BC=8C=E4=BC=9A=E9=83=BD=E5=8A=A0=E5=85=A5=E5=88=B0PK?= =?UTF-8?q?=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../live/presenter/AbsLinkMicPkPresenter.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/live/src/main/java/com/yunbao/live/presenter/AbsLinkMicPkPresenter.java b/live/src/main/java/com/yunbao/live/presenter/AbsLinkMicPkPresenter.java index c99610974..110acedd9 100644 --- a/live/src/main/java/com/yunbao/live/presenter/AbsLinkMicPkPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/AbsLinkMicPkPresenter.java @@ -11,6 +11,8 @@ import com.yunbao.common.http.LiveHttpUtil; import com.yunbao.common.interfaces.OnItemClickListener; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.AppManager; +import com.yunbao.common.utils.ToastUtil; +import com.yunbao.live.R; import com.yunbao.live.views.LiveRoomViewHolder; public abstract class AbsLinkMicPkPresenter { @@ -115,7 +117,22 @@ public abstract class AbsLinkMicPkPresenter { } protected void isPKTmp(UserBean u) { - isPK(u); + LiveHttpUtil.livePkCheckLive(IMLoginManager.get(AppManager.getInstance().getMainActivity()).getUserInfo().getId()+"", "", "", new HttpCallback() { + @Override + public void onSuccess(int code, String msg, String[] info) { + if (code == 0 && info.length > 0) { + JSONObject obj = JSON.parseObject(info[0]); + if (obj != null) { + if (obj.getString("ispk").equals("0")) { + isPK(u); + } else { + ToastUtil.show(AppManager.getInstance().getMainActivity().getString(R.string.pking_over)); + } + } + } + } + }); + } protected void onDRPkApplyTmp(UserBean u) {