优化为只有从主播PK中跳转直播间失败(被踢过)才不再随机匹配直播间了
This commit is contained in:
parent
58ba80929b
commit
0646c2c6a7
@ -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);
|
||||
|
@ -681,7 +681,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
|
||||
public void onCheckError(String contextError) {
|
||||
|
||||
}
|
||||
});
|
||||
},true);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user