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) {