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); } } });