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())