From 14490cacfa45b1234acedcc14f05e639b2bf8f54 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Fri, 7 Apr 2023 10:57:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A4=9A=E4=BA=BAPK=E4=B8=8D?= =?UTF-8?q?=E4=BC=9A=E9=9A=90=E8=97=8F=E5=A5=B3=E7=A5=9E=E8=AF=B4=E5=92=8C?= =?UTF-8?q?=E8=81=94=E7=B3=BB=E6=96=B9=E5=BC=8F=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/live/views/LiveRoomViewHolder.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) 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 b95e809f0..d81a339f5 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -306,7 +306,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis private List mBannerList2 = new ArrayList<>(); private List mBannerList3 = new ArrayList<>(); private List mBannerList4 = new ArrayList<>(); - private List mTopBannerList = new ArrayList<>(); + private List mTopBannerList = null; private LinearLayout btn_event2, btn_event3, btn_event4, enterRoomLeave2; private ImageView imgEvent; private View btnEvent; @@ -1316,7 +1316,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis mBannerList2.clear(); mBannerList3.clear(); mBannerList4.clear(); - mTopBannerList.clear(); + if (mTopBannerList != null) { + mTopBannerList.clear(); + } sayModel = null; updataCleanMic(); // initStarChallengeStatus(); @@ -4285,11 +4287,13 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis String s1 = StringUtil.getDurationText(mPkTimeCount * 1000); textTime.setText(String.format(mContext.getString(R.string.pk_time), s1)); countdownHandler.postAtTime(countdownRunnable, getNextSecondTime()); + hideAnchorSayAndCallAnchor(); } else { timeTitle.setVisibility(View.GONE); countdownHandler.removeCallbacks(countdownRunnable); Bus.get().post(new LiveAudienceEvent() .setType(LiveAudienceEvent.LiveAudienceType.PK_TIME_COUNT)); + showAnchorSayAndCallAnchor(); } } }; @@ -4503,7 +4507,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } public void updateTopBanner() { - if (!TextUtils.isEmpty(wishListProgress.getWishlistName())||!TextUtils.isEmpty(wishListProgress.getWishlistProgress())) { + if (!TextUtils.isEmpty(wishListProgress.getWishlistName()) || !TextUtils.isEmpty(wishListProgress.getWishlistProgress())) { if (mTopBannerList == null) { mTopBannerList = new ArrayList<>(); } @@ -4526,7 +4530,12 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis public void initTopBanner() { checkNewLetter(); - mTopBannerList = new ArrayList<>(); + if (mTopBannerList == null) { + mTopBannerList = new ArrayList<>(); + } + if (!mTopBannerList.isEmpty()) { + return; + } topBanner1.setVisibility(View.GONE); topBanner1.setAutoPlay(true) .setPages(mTopBannerList, new TopBannerCustomViewHolder())