From e6766dc5eb8d98c19fe20764ee90d014633e4075 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Mon, 28 Nov 2022 14:36:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=9B=B4=E6=92=AD=E9=97=B4?= =?UTF-8?q?=E6=BB=9A=E5=8A=A8=EF=BC=8C=E6=A8=AA=E7=AB=96=E5=B1=8F=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../live/activity/LiveAudienceActivity.java | 1 - .../live/activity/PDLIiveChatActivity.java | 8 +------ .../live/activity/WebViewActivityMedal.java | 8 +------ .../live/dialog/LiveGameDialogFragment.java | 7 +------ .../dialog/LiveOldUserDialogFragment.java | 7 +------ .../live/presenter/LiveGiftAnimPresenter.java | 8 +------ .../live/views/PortraitLiveManager.java | 2 +- .../yunbao/live/views/SidebarViewHoler.java | 21 ++++--------------- .../yunbao/main/activity/EntryActivity.java | 10 +++------ .../main/activity/LiveClassActivity.java | 8 ++----- .../yunbao/main/activity/LoginActivity.java | 10 ++------- .../yunbao/main/activity/MainActivity.java | 21 +++---------------- 12 files changed, 20 insertions(+), 91 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 802d8f29a..a2c56a261 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java @@ -293,7 +293,6 @@ public class LiveAudienceActivity extends LiveActivity { mViewGroup = viewGroup; mLastPosition = currentItem; liveHandler.post(liveRunnable); - Log.e("收到socket--->", "mLiveUid--------------------------->" + mLiveUid); } diff --git a/live/src/main/java/com/yunbao/live/activity/PDLIiveChatActivity.java b/live/src/main/java/com/yunbao/live/activity/PDLIiveChatActivity.java index 006034105..e154e86cb 100644 --- a/live/src/main/java/com/yunbao/live/activity/PDLIiveChatActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/PDLIiveChatActivity.java @@ -28,7 +28,6 @@ import com.yunbao.live.adapter.SystemChatMessageAdapter; import com.yunbao.live.bean.ImUserBean; import com.yunbao.live.event.RecommendLiveRoomEvent; import com.yunbao.live.http.LiveHttpUtil; -import com.yunbao.live.presenter.LiveRoomCheckLivePresenter; import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; @@ -195,12 +194,7 @@ public class PDLIiveChatActivity extends FragmentActivity { 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); } diff --git a/live/src/main/java/com/yunbao/live/activity/WebViewActivityMedal.java b/live/src/main/java/com/yunbao/live/activity/WebViewActivityMedal.java index b4ad0222c..d9771066d 100644 --- a/live/src/main/java/com/yunbao/live/activity/WebViewActivityMedal.java +++ b/live/src/main/java/com/yunbao/live/activity/WebViewActivityMedal.java @@ -166,13 +166,7 @@ public class WebViewActivityMedal 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); - - 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/live/src/main/java/com/yunbao/live/dialog/LiveGameDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveGameDialogFragment.java index e7ccdeaed..e20f31a52 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveGameDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveGameDialogFragment.java @@ -294,12 +294,7 @@ public class LiveGameDialogFragment extends AbsDialogFragment { 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, live_id, 0); } diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveOldUserDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveOldUserDialogFragment.java index 2d38f32c7..1e838ec12 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveOldUserDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveOldUserDialogFragment.java @@ -184,12 +184,7 @@ public class LiveOldUserDialogFragment extends AbsDialogFragment implements View 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); } } }); diff --git a/live/src/main/java/com/yunbao/live/presenter/LiveGiftAnimPresenter.java b/live/src/main/java/com/yunbao/live/presenter/LiveGiftAnimPresenter.java index cee00ed14..b5b6fdf19 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveGiftAnimPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveGiftAnimPresenter.java @@ -373,13 +373,7 @@ public class LiveGiftAnimPresenter { 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); } } }); diff --git a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java index af6344803..802d56e63 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -296,7 +296,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe .enterRoomNew(mLiveBean.getStream(), mLiveBean.getUid(), mLiveBean.getCity(), new com.yunbao.common.http.base.HttpCallback() { @Override public void onSuccess(EnterRoomNewModel data) { -// mLivePlayViewHolder.setLiveBeanLandscape(data.getLiveInfo().getLandscape()); + mLivePlayViewHolder.setLiveBeanLandscape(data.getLiveInfo().getLandscape()); isEnterRoom = true; //加入房间发送Im消息 LiveNetManager.get(mContext).userJoinRoomNew(mLiveBean.getStream(), mLiveBean.getUid()); diff --git a/live/src/main/java/com/yunbao/live/views/SidebarViewHoler.java b/live/src/main/java/com/yunbao/live/views/SidebarViewHoler.java index 0c7788d2b..f8581185f 100644 --- a/live/src/main/java/com/yunbao/live/views/SidebarViewHoler.java +++ b/live/src/main/java/com/yunbao/live/views/SidebarViewHoler.java @@ -20,11 +20,8 @@ import com.yunbao.common.views.SlideInBannerViewHolder; import com.yunbao.common.views.weight.ViewClicksAntiShake; import com.yunbao.live.R; import com.yunbao.live.http.LiveHttpUtil; -import com.yunbao.live.presenter.LiveRoomCheckLivePresenter; -import java.util.HashMap; import java.util.List; -import java.util.Map; public class SidebarViewHoler extends RecyclerView.ViewHolder { //侧边栏轮播 @@ -102,20 +99,10 @@ public class SidebarViewHoler extends RecyclerView.ViewHolder { mShowLoadingDialog.dismiss(); return; } - new LiveRoomCheckLivePresenter(mBanner.getContext(), liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() { - @Override - public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) { - Map map = null; - if (type == 2) { - map = new HashMap<>(); - map.put("OPEN", "NEWUSER"); - } - RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk)); - if (mShowLoadingDialog != null && mShowLoadingDialog.isShowing()) - mShowLoadingDialog.dismiss(); - ((Activity) itemView.getContext()).finish(); - } - }); + RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0); + if (mShowLoadingDialog != null && mShowLoadingDialog.isShowing()) + mShowLoadingDialog.dismiss(); + ((Activity) itemView.getContext()).finish(); } else { if (mShowLoadingDialog != null && mShowLoadingDialog.isShowing()) mShowLoadingDialog.dismiss(); diff --git a/main/src/main/java/com/yunbao/main/activity/EntryActivity.java b/main/src/main/java/com/yunbao/main/activity/EntryActivity.java index ad2222bdf..daa545048 100644 --- a/main/src/main/java/com/yunbao/main/activity/EntryActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/EntryActivity.java @@ -683,13 +683,9 @@ public class EntryActivity extends AppCompatActivity { if (liveBean == null) { return; } - new LiveRoomCheckLivePresenter(activity, 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(activity).setFrist(false); - } - }); + RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0); + NoviceInstructorManager.get(activity).setFrist(false); + } else { MainActivity.forward(EntryActivity.this, false); diff --git a/main/src/main/java/com/yunbao/main/activity/LiveClassActivity.java b/main/src/main/java/com/yunbao/main/activity/LiveClassActivity.java index e08ad79cd..e5f84f590 100644 --- a/main/src/main/java/com/yunbao/main/activity/LiveClassActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/LiveClassActivity.java @@ -116,12 +116,8 @@ public class LiveClassActivity extends AbsActivity implements OnItemClickListene * 观看直播 */ public void watchLive(LiveBean liveBean, int position) { - 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); + } @Override diff --git a/main/src/main/java/com/yunbao/main/activity/LoginActivity.java b/main/src/main/java/com/yunbao/main/activity/LoginActivity.java index 037722d54..766ebda98 100644 --- a/main/src/main/java/com/yunbao/main/activity/LoginActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/LoginActivity.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; @@ -240,13 +239,8 @@ public class LoginActivity extends AbsActivity { if (liveBean == null) { return; } - new LiveRoomCheckLivePresenter(activity, 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(activity).setFrist(false); - } - }); + RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0); + NoviceInstructorManager.get(activity).setFrist(false); } else { MainActivity.forward(LoginActivity.this, false); diff --git a/main/src/main/java/com/yunbao/main/activity/MainActivity.java b/main/src/main/java/com/yunbao/main/activity/MainActivity.java index 7c2d84a3a..97b5b6e17 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -237,12 +237,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene 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 { ToastUtil.show("直播已结束"); } @@ -413,12 +408,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene 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, Uid, 0); } @@ -887,12 +877,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene * 观看直播 */ public void watchLive(LiveBean liveBean, String key, int position) { - 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); }