diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index 6fea47448..a40904be1 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -3021,26 +3021,22 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis Bus.get().post(new LiveAudienceEvent() .setActivity(true) .setType(LiveAudienceEvent.LiveAudienceType.BOTTOM_COLLECTION)); - new Handler(Looper.getMainLooper()).postDelayed(() -> { - loadingDialog.dismiss(); - loadingDialog = null; - }, 300); } else if (bean.getActivityId() == 0) { openWebDialog(bean.getLink()); } else { LiveGameDialogFragment fragment = new LiveGameDialogFragment("1".equals(bean.getShow_type())); fragment.setActivityId(bean.getActivityId()); fragment.setRoomId(mLiveUid); - fragment.setShowListener(dialog1 -> { - new Handler(Looper.getMainLooper()).postDelayed(() -> { - loadingDialog.dismiss(); - loadingDialog = null; - }, 300); - }); fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGameDialogFragment"); } }); loadingDialog.show(); + new Handler(Looper.getMainLooper()).postDelayed(() -> { + if (loadingDialog != null && loadingDialog.isShowing()) { + loadingDialog.dismiss(); + } + loadingDialog = null; + }, 300); }