From 0d6bf8adaa5d6b29585be2b468ea7757039fd6d2 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Tue, 25 Oct 2022 17:11:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=9B=B4=E6=92=AD=E9=97=B4?= =?UTF-8?q?=E4=BE=A7=E8=BE=B9=E6=A0=8FBanner=E7=82=B9=E5=87=BB=E5=90=8E?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E5=BC=B9=E7=AA=97=E4=B8=8D=E4=BC=9A=E6=B6=88?= =?UTF-8?q?=E5=A4=B1=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/live/views/SidebarViewHoler.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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 c66f2a0d0..298edf6ed 100644 --- a/live/src/main/java/com/yunbao/live/views/SidebarViewHoler.java +++ b/live/src/main/java/com/yunbao/live/views/SidebarViewHoler.java @@ -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 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(); }