修复直播间侧边栏Banner点击后加载弹窗不会消失的问题

This commit is contained in:
zlzw 2022-10-25 17:11:14 +08:00
parent bc87e143c8
commit 0d6bf8adaa

View File

@ -77,6 +77,7 @@ public class SidebarViewHoler extends RecyclerView.ViewHolder {
String link = bean.getSlideUrl(); String link = bean.getSlideUrl();
if (link.contains("http")) { if (link.contains("http")) {
WebViewActivity.forward(itemView.getContext(), link, true); WebViewActivity.forward(itemView.getContext(), link, true);
if (mShowLoadingDialog != null && mShowLoadingDialog.isShowing())
mShowLoadingDialog.dismiss(); mShowLoadingDialog.dismiss();
} else { } else {
gotoLive(link, bean.getType()); gotoLive(link, bean.getType());
@ -99,6 +100,7 @@ public class SidebarViewHoler extends RecyclerView.ViewHolder {
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class); LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
LiveRoomCheckLivePresenter mCheckLivePresenter = new LiveRoomCheckLivePresenter(itemView.getContext(), (liveBean1, liveType, liveTypeVal, liveSdk) -> { LiveRoomCheckLivePresenter mCheckLivePresenter = new LiveRoomCheckLivePresenter(itemView.getContext(), (liveBean1, liveType, liveTypeVal, liveSdk) -> {
if (liveBean1 == null) { if (liveBean1 == null) {
if (mShowLoadingDialog != null && mShowLoadingDialog.isShowing())
mShowLoadingDialog.dismiss(); mShowLoadingDialog.dismiss();
return; return;
} }
@ -108,12 +110,14 @@ public class SidebarViewHoler extends RecyclerView.ViewHolder {
map.put("OPEN", "NEWUSER"); map.put("OPEN", "NEWUSER");
} }
LiveAudienceActivity.forward(itemView.getContext(), liveBean1, liveType, liveTypeVal, "", map, 0, liveSdk); LiveAudienceActivity.forward(itemView.getContext(), liveBean1, liveType, liveTypeVal, "", map, 0, liveSdk);
if (mShowLoadingDialog != null && mShowLoadingDialog.isShowing())
mShowLoadingDialog.dismiss(); mShowLoadingDialog.dismiss();
((Activity) itemView.getContext()).finish(); ((Activity) itemView.getContext()).finish();
}); });
mCheckLivePresenter.checkLive(liveBean); mCheckLivePresenter.checkLive(liveBean);
} else { } else {
if (mShowLoadingDialog != null && mShowLoadingDialog.isShowing())
mShowLoadingDialog.dismiss(); mShowLoadingDialog.dismiss();
RouteUtil.forwardUserHome(itemView.getContext(), liveId, 0); RouteUtil.forwardUserHome(itemView.getContext(), liveId, 0);
((Activity) itemView.getContext()).finish(); ((Activity) itemView.getContext()).finish();