From e405965298e3843c0a833b6ff37e618361c6d689 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Mon, 28 Nov 2022 14:42:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A4=9A=E6=AC=A1=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E6=A3=80=E6=9F=A5=E7=9B=B4=E6=92=AD=E9=97=B4=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunbao/main/activity/RegisterActivity.java | 11 +++-------- .../com/yunbao/main/activity/SearchActivity.java | 13 +++---------- .../yunbao/main/activity/WeekWebViewActivity.java | 7 +------ .../com/yunbao/main/adapter/SearchAdapter.java | 7 +------ .../com/yunbao/main/dialog/OneLoginDialog.java | 10 +++------- .../main/views/AbsMainListChildViewHolder.java | 14 ++------------ .../main/views/MainHomeCommunityViewHolder.java | 7 +------ .../yunbao/main/views/MainHomeLiveViewHolder.java | 7 +------ .../yunbao/main/views/MainMessageViewHolder.java | 8 ++------ 9 files changed, 17 insertions(+), 67 deletions(-) diff --git a/main/src/main/java/com/yunbao/main/activity/RegisterActivity.java b/main/src/main/java/com/yunbao/main/activity/RegisterActivity.java index ad08ab34e..46e119353 100644 --- a/main/src/main/java/com/yunbao/main/activity/RegisterActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/RegisterActivity.java @@ -50,7 +50,6 @@ import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.WordUtil; import com.yunbao.live.http.LiveHttpUtil; -import com.yunbao.live.presenter.LiveRoomCheckLivePresenter; import com.yunbao.main.R; import com.yunbao.main.event.RegSuccessEvent; import com.yunbao.main.http.MainHttpConsts; @@ -503,13 +502,9 @@ public class RegisterActivity extends AbsActivity { if (liveBean == null) { return; } - new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() { - @Override - public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) { - RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk)); - NoviceInstructorManager.get(mContext).setFrist(false); - } - }); + RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0); + NoviceInstructorManager.get(mContext).setFrist(false); + } else { MainActivity.forward(RegisterActivity.this, false); } diff --git a/main/src/main/java/com/yunbao/main/activity/SearchActivity.java b/main/src/main/java/com/yunbao/main/activity/SearchActivity.java index d0e5097a3..ee08d2fbf 100644 --- a/main/src/main/java/com/yunbao/main/activity/SearchActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/SearchActivity.java @@ -18,20 +18,18 @@ import androidx.fragment.app.FragmentTransaction; import com.alibaba.fastjson.JSON; import com.yunbao.common.activity.AbsActivity; +import com.yunbao.common.bean.LiveBean; import com.yunbao.common.event.CloseEvent; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.manager.SearchHistoryRecordManager; import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.RouteUtil; -import com.yunbao.live.activity.LiveAudienceActivity; -import com.yunbao.common.bean.LiveBean; +import com.yunbao.common.utils.WordsTypeUtil; import com.yunbao.live.http.LiveHttpUtil; -import com.yunbao.live.presenter.LiveRoomCheckLivePresenter; import com.yunbao.main.R; import com.yunbao.main.event.JumpUserHomeEvent; import com.yunbao.main.fragment.SearchRecommendFragment; import com.yunbao.main.fragment.SearchResultsFragment; -import com.yunbao.common.utils.WordsTypeUtil; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; @@ -174,13 +172,8 @@ public class SearchActivity extends AbsActivity { public void onSuccess(int code, String msg, String[] info) { if (code == 0 && info.length > 0) { LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class); + RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0); - new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() { - @Override - public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) { - RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk)); - } - }); } else { //跳转到个人资料 if (imm != null && mEditText != null) { diff --git a/main/src/main/java/com/yunbao/main/activity/WeekWebViewActivity.java b/main/src/main/java/com/yunbao/main/activity/WeekWebViewActivity.java index 9734ad6fe..c2c8618b1 100644 --- a/main/src/main/java/com/yunbao/main/activity/WeekWebViewActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/WeekWebViewActivity.java @@ -152,12 +152,7 @@ public class WeekWebViewActivity extends AbsActivity { if (liveBean == null) { return; } - new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() { - @Override - public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) { - RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk)); - } - }); + RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0); } else { RouteUtil.forwardUserHome(mContext, live_id, 0); } diff --git a/main/src/main/java/com/yunbao/main/adapter/SearchAdapter.java b/main/src/main/java/com/yunbao/main/adapter/SearchAdapter.java index 0a3957c48..ab419926b 100644 --- a/main/src/main/java/com/yunbao/main/adapter/SearchAdapter.java +++ b/main/src/main/java/com/yunbao/main/adapter/SearchAdapter.java @@ -199,12 +199,7 @@ public class SearchAdapter extends RefreshAdapter { return; } - new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() { - @Override - public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) { - RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk)); - } - }); + RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0); } else { RouteUtil.forwardUserHome(mContext, live_id, 0); } diff --git a/main/src/main/java/com/yunbao/main/dialog/OneLoginDialog.java b/main/src/main/java/com/yunbao/main/dialog/OneLoginDialog.java index 2cccd7901..9fdd4c692 100644 --- a/main/src/main/java/com/yunbao/main/dialog/OneLoginDialog.java +++ b/main/src/main/java/com/yunbao/main/dialog/OneLoginDialog.java @@ -148,13 +148,9 @@ public class OneLoginDialog extends AbsDialogFragment { if (liveBean == null) { return; } - new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() { - @Override - public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) { - RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk)); - NoviceInstructorManager.get(mContext).setFrist(false); - } - }); + RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0); + NoviceInstructorManager.get(mContext).setFrist(false); + } else { MainActivity.forward(mContext, false); } diff --git a/main/src/main/java/com/yunbao/main/views/AbsMainListChildViewHolder.java b/main/src/main/java/com/yunbao/main/views/AbsMainListChildViewHolder.java index 67bd50923..20e1aafe5 100644 --- a/main/src/main/java/com/yunbao/main/views/AbsMainListChildViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/AbsMainListChildViewHolder.java @@ -148,12 +148,7 @@ public abstract class AbsMainListChildViewHolder extends AbsMainViewHolder imple public void onSuccess(int code, String msg, String[] info) { if (code == 0 && info.length > 0) { LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class); - new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() { - @Override - public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) { - RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk)); - } - }); + RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0); } else { MainActivity.forward(mContext, false); } @@ -364,12 +359,7 @@ public abstract class AbsMainListChildViewHolder extends AbsMainViewHolder imple if (code == 0 && info.length > 0) { LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class); - new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() { - @Override - public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) { - RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk)); - } - }); + RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0); } else { MainActivity.forward(mContext, false); } diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java index d198feb32..f60c7ac90 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java @@ -235,12 +235,7 @@ public class MainHomeCommunityViewHolder extends AbsMainHomeChildViewHolder impl if (code == 0 && info.length > 0) { LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class); - new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() { - @Override - public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) { - RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk)); - } - }); + RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0); } else { RouteUtil.forwardUserHome(mContext, String.valueOf(live_id), 0); diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java index 2339e012c..0d3a00b8d 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java @@ -326,12 +326,7 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement if (gotoRoomKey != null && gotoRoomKey.isEmpty()) { gotoRoomKey = null; } - new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() { - @Override - public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) { - RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk)); - } - }); + RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0); } else { intoIndex = 1; diff --git a/main/src/main/java/com/yunbao/main/views/MainMessageViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainMessageViewHolder.java index dc240690a..4fa6f9648 100644 --- a/main/src/main/java/com/yunbao/main/views/MainMessageViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainMessageViewHolder.java @@ -416,12 +416,8 @@ public class MainMessageViewHolder extends AbsMainViewHolder { public void onSuccess(int code, String msg, String[] info) { if (code == 0 && info.length > 0) { LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class); - new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() { - @Override - public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) { - RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk)); - } - }); + RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0); + } else { RouteUtil.forwardUserHome(mContext, event.getLiveuid(), 0); }