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

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

View File

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