From d9d5cf7046dc67645316097cdc2a974b506a3594 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Mon, 22 Apr 2024 13:56:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E7=9B=B4=E6=92=AD?= =?UTF-8?q?=E9=97=B4=E8=B7=B3=E8=BD=AC=E5=85=B6=E4=BB=96=E4=BA=BA=E7=9B=B4?= =?UTF-8?q?=E6=92=AD=E9=97=B4=E5=A4=B1=E8=B4=A5(=E4=B8=8A=E4=B8=8A?= =?UTF-8?q?=E5=91=A8=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/UserHomeActivity.java | 12 +++++++++++- .../yunbao/main/dialog/MainStartDialogFragment.java | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java b/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java index f8c92ac9b..b53248063 100644 --- a/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java @@ -51,6 +51,7 @@ import com.yunbao.common.bean.LiveBean; import com.yunbao.common.bean.NewLevelModel; import com.yunbao.common.bean.UserHomeImgBean; import com.yunbao.common.dialog.ImagePreviewDialog; +import com.yunbao.common.event.LiveRoomChangeEvent; import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.http.LiveHttpUtil; @@ -61,6 +62,7 @@ import com.yunbao.common.manager.NewLevelManager; import com.yunbao.common.upload.UploadBean; import com.yunbao.common.upload.UploadCallback; import com.yunbao.common.upload.UploadQnImpl; +import com.yunbao.common.utils.AppManager; import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.FilesUtils; import com.yunbao.common.utils.L; @@ -627,7 +629,15 @@ public class UserHomeActivity extends AbsActivity { 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(liveSdk), Integer.parseInt(liveTypeVal)); + if (StringUtil.isEmpty(liveUid)) { + return; + } + finish(); + if (AppManager.getInstance().getLiveActivity() != null) { + EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, Integer.parseInt(liveTypeVal)).setLiveEnd(true)); + } else { + RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk)); + } } @Override diff --git a/main/src/main/java/com/yunbao/main/dialog/MainStartDialogFragment.java b/main/src/main/java/com/yunbao/main/dialog/MainStartDialogFragment.java index cb107c793..9ade12c31 100644 --- a/main/src/main/java/com/yunbao/main/dialog/MainStartDialogFragment.java +++ b/main/src/main/java/com/yunbao/main/dialog/MainStartDialogFragment.java @@ -31,6 +31,7 @@ import com.yunbao.common.dialog.AbsDialogFragment; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.LiveHttpUtil; import com.yunbao.common.manager.IMLoginManager; +import com.yunbao.common.utils.AppManager; import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.PluginManager; import com.yunbao.common.utils.ProcessResultUtil; @@ -305,6 +306,7 @@ public class MainStartDialogFragment extends AbsDialogFragment implements View.O if (isWifiProxy(mContext) || checkVPN((ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE))) { ToastUtil.show(WordUtil.isNewZh()?"檢測開啓了VPN或者代理,請先關閉VPN或者代理再開播。": "It is detected that VPN or proxy is turned on. Please turn off VPN or proxy before starting the broadcast."); + AppManager.runDebugCode(() -> mCallback.onLiveClick()); } else { if (mCallback != null) { MobclickAgent.onEvent(mContext, "home_page_broadcast", "点击开播按钮");