From 44c6e5e4cd6a090e3dc1a083e25c55da9b9614c5 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Tue, 27 Sep 2022 11:04:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=86=E7=A0=81=E6=88=BF=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../live/activity/LiveAudienceActivity.java | 1 - .../live/dialog/LiveHDDialogFragment.java | 1 - .../presenter/LiveRoomCheckLivePresenter.java | 36 +++++++++---------- .../yunbao/live/views/LiveRoomViewHolder.java | 1 - 4 files changed, 16 insertions(+), 23 deletions(-) diff --git a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java index b517f1e34..b00ab6b2a 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java @@ -286,7 +286,6 @@ public class LiveAudienceActivity extends LiveActivity { public void onSuccess(int code, String msg, String[] info) { if (code == 0 && info.length > 0) { LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class); - LiveRoomCheckLivePresenter.isRoom = true; LiveRoomCheckLivePresenter mCheckLivePresenter = new LiveRoomCheckLivePresenter(mContext, (liveBean1, liveType, liveTypeVal, liveSdk) -> { //主播正在直播 if (liveBean1 == null) { diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java index 205dccc80..b4dfb8738 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java @@ -269,7 +269,6 @@ public class LiveHDDialogFragment extends AbsDialogFragment { if (code == 0 && info.length > 0) { LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class); if (mCheckLivePresenter == null) { - LiveRoomCheckLivePresenter.isRoom = false; mCheckLivePresenter = new LiveRoomCheckLivePresenter(mContext, new LiveRoomCheckLivePresenter.ActionListener() { @Override public void onLiveRoomChanged(LiveBean liveBean, int liveType, int liveTypeVal, int liveSdk) { diff --git a/live/src/main/java/com/yunbao/live/presenter/LiveRoomCheckLivePresenter.java b/live/src/main/java/com/yunbao/live/presenter/LiveRoomCheckLivePresenter.java index 5531a0158..e90bd6bc9 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveRoomCheckLivePresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveRoomCheckLivePresenter.java @@ -106,27 +106,23 @@ public class LiveRoomCheckLivePresenter { * 前往密码房间 */ private void forwardPwdRoom() { - if (!isRoom) { - DialogUitl.showSimpleInputDialog(mContext, WordUtil.getString(R.string.live_input_password), DialogUitl.INPUT_TYPE_NUMBER_PASSWORD, new DialogUitl.SimpleCallback() { - @Override - public void onConfirmClick(Dialog dialog, String content) { - if (TextUtils.isEmpty(content)) { - ToastUtil.show(WordUtil.getString(R.string.live_input_password)); - return; - } - String password = MD5Util.getMD5(content); - if (mLiveTypeMsg.equalsIgnoreCase(password)) { - dialog.dismiss(); - enterLiveRoom(); - } else { - ToastUtil.show(WordUtil.getString(R.string.live_password_error)); - } + DialogUitl.showSimpleInputDialog(mContext, WordUtil.getString(R.string.live_input_password), DialogUitl.INPUT_TYPE_NUMBER_PASSWORD, new DialogUitl.SimpleCallback() { + @Override + public void onConfirmClick(Dialog dialog, String content) { + if (TextUtils.isEmpty(content)) { + ToastUtil.show(WordUtil.getString(R.string.live_input_password)); + return; } - }); - } else { - enterLiveRoom(); - isRoom = false; - } + String password = MD5Util.getMD5(content); + if (mLiveTypeMsg.equalsIgnoreCase(password)) { + dialog.dismiss(); + enterLiveRoom(); + } else { + ToastUtil.show(WordUtil.getString(R.string.live_password_error)); + } + } + }); + } diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index 704c2de68..f97fc0191 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -3011,7 +3011,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis * 前往直播间 */ private void gotoLive(final String liveId) { - LiveRoomCheckLivePresenter.isRoom = false; LiveHttpUtil.getLiveInfo(liveId, new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) {