From 0646c2c6a7b5db35e4d165011b616393b0ad31df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E7=9A=AE?= <14840170+lao-pi123@user.noreply.gitee.com> Date: Fri, 20 Sep 2024 13:22:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=BA=E5=8F=AA=E6=9C=89?= =?UTF-8?q?=E4=BB=8E=E4=B8=BB=E6=92=ADPK=E4=B8=AD=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E7=9B=B4=E6=92=AD=E9=97=B4=E5=A4=B1=E8=B4=A5=EF=BC=88=E8=A2=AB?= =?UTF-8?q?=E8=B8=A2=E8=BF=87=EF=BC=89=E6=89=8D=E4=B8=8D=E5=86=8D=E9=9A=8F?= =?UTF-8?q?=E6=9C=BA=E5=8C=B9=E9=85=8D=E7=9B=B4=E6=92=AD=E9=97=B4=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/common/utils/LiveRoomCheckLivePresenter.java | 7 +++++-- .../com/yunbao/live/dialog/LiveUserDialogFragment.java | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/utils/LiveRoomCheckLivePresenter.java b/common/src/main/java/com/yunbao/common/utils/LiveRoomCheckLivePresenter.java index c1c2435e8..a3eb49433 100644 --- a/common/src/main/java/com/yunbao/common/utils/LiveRoomCheckLivePresenter.java +++ b/common/src/main/java/com/yunbao/common/utils/LiveRoomCheckLivePresenter.java @@ -43,8 +43,9 @@ public class LiveRoomCheckLivePresenter { * @param context 上下文 * @param liveUid 直播间ID * @param stream + * @param isPk 是否是pk时点击头像打开弹窗后跳转来的 */ - public LiveRoomCheckLivePresenter(Context context, String liveUid, String stream, NewActionListener actionListener) { + public LiveRoomCheckLivePresenter(Context context, String liveUid, String stream, NewActionListener actionListener,boolean... isPk) { mContext = context; LiveNetManager.get(context) .checkLive(liveUid, stream, new CheckLiveCallBack() { @@ -108,8 +109,10 @@ public class LiveRoomCheckLivePresenter { @Override public void onError(String error,int code) { Log.e("直播间异常", "onError: " + error + " code = " + code); - if (code != 1004) { + if (code == 1004 && isPk != null && isPk.length > 0 && isPk[0]) { // 1004 为用户被踢过,不能进入直播间但是不能随机再进入别的直播间 + Log.e("直播间异常", "onError: " + error + " code = " + code); + }else { Bus.get().post(new LiveErrorEvent()); } ToastUtil.show(error); diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveUserDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveUserDialogFragment.java index 8e23a8a9c..cfd746637 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveUserDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveUserDialogFragment.java @@ -681,7 +681,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On public void onCheckError(String contextError) { } - }); + },true); } } });