From 6603a2dbb599d7aa42708d9ff7f29e84055fff69 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Thu, 8 Jun 2023 14:33:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DRanking.getAnchorRankData?= =?UTF-8?q?=E5=A4=9A=E6=AC=A1=E8=B0=83=E7=94=A8=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 | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 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 7d83cdb57..eed4c69ac 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -1506,6 +1506,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis public void resetView() { resetViewGone(); visibility = false; + pkUidTmp = ""; mBannerList1.clear(); mBannerList2.clear(); mBannerList3.clear(); @@ -2091,10 +2092,13 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis initPkRank(null); } + private String pkUidTmp =""; + public void initPkRank(String isLadders) { - if(StringUtil.isEmpty(pkUid)){ + if (pkUidTmp.equals(pkUid)) { return; } + pkUidTmp=pkUid; pkRankLayout.setVisibility(View.GONE); new LoadDian9TuUtil().loadDian9TuAssets2(mContext, liveRankPk2, "rectangle_new.png", 1); mRedVal.setVisibility(View.GONE); @@ -2140,6 +2144,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis liveRankPk2.setVisibility(View.VISIBLE); mPkRankText.setText(bean.getName()); ImgLoader.display(mContext, bean.getImg(), mPkRankIcon); + pkUidTmp = ""; if (StringUtil.isEmpty(bean.getPkTopImgUrl())) { return; } @@ -2162,6 +2167,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis @Override public void onError(String error) { ToastUtil.show(R.string.net_error); + pkUidTmp = ""; } }); @@ -2480,9 +2486,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis */ public void setRoomNum(String roomNum) { if (mID != null) { - if (roomNum.contains("ID")){ + if (roomNum.contains("ID")) { mID.setText(roomNum); - }else { + } else { mID.setText(String.format("ID:%s", roomNum)); } @@ -3686,9 +3692,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis if (!StringUtil.isEmpty(goodNumber) && !goodNumber.equals("0")) { mAnchorLayout.setBackgroundResource(R.drawable.bg_live_anchor_goodnum); - if (goodNumber.contains("ID")){ + if (goodNumber.contains("ID")) { mID.setText(goodNumber); - }else { + } else { mID.setText(String.format("ID:%s", goodNumber)); } mGoodNumberIcon.setVisibility(View.VISIBLE); @@ -4652,7 +4658,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis mHandler.removeMessages(WHAT_PK_TIME); } isShowGif = false; - if(voteManager!=null){ + if (voteManager != null) { voteManager.hide(); } }