修复Ranking.getAnchorRankData多次调用问题
This commit is contained in:
parent
f3a0b4d145
commit
6603a2dbb5
@ -1506,6 +1506,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
public void resetView() {
|
public void resetView() {
|
||||||
resetViewGone();
|
resetViewGone();
|
||||||
visibility = false;
|
visibility = false;
|
||||||
|
pkUidTmp = "";
|
||||||
mBannerList1.clear();
|
mBannerList1.clear();
|
||||||
mBannerList2.clear();
|
mBannerList2.clear();
|
||||||
mBannerList3.clear();
|
mBannerList3.clear();
|
||||||
@ -2091,10 +2092,13 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
initPkRank(null);
|
initPkRank(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String pkUidTmp ="";
|
||||||
|
|
||||||
public void initPkRank(String isLadders) {
|
public void initPkRank(String isLadders) {
|
||||||
if(StringUtil.isEmpty(pkUid)){
|
if (pkUidTmp.equals(pkUid)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
pkUidTmp=pkUid;
|
||||||
pkRankLayout.setVisibility(View.GONE);
|
pkRankLayout.setVisibility(View.GONE);
|
||||||
new LoadDian9TuUtil().loadDian9TuAssets2(mContext, liveRankPk2, "rectangle_new.png", 1);
|
new LoadDian9TuUtil().loadDian9TuAssets2(mContext, liveRankPk2, "rectangle_new.png", 1);
|
||||||
mRedVal.setVisibility(View.GONE);
|
mRedVal.setVisibility(View.GONE);
|
||||||
@ -2140,6 +2144,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
liveRankPk2.setVisibility(View.VISIBLE);
|
liveRankPk2.setVisibility(View.VISIBLE);
|
||||||
mPkRankText.setText(bean.getName());
|
mPkRankText.setText(bean.getName());
|
||||||
ImgLoader.display(mContext, bean.getImg(), mPkRankIcon);
|
ImgLoader.display(mContext, bean.getImg(), mPkRankIcon);
|
||||||
|
pkUidTmp = "";
|
||||||
if (StringUtil.isEmpty(bean.getPkTopImgUrl())) {
|
if (StringUtil.isEmpty(bean.getPkTopImgUrl())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -2162,6 +2167,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
ToastUtil.show(R.string.net_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) {
|
public void setRoomNum(String roomNum) {
|
||||||
if (mID != null) {
|
if (mID != null) {
|
||||||
if (roomNum.contains("ID")){
|
if (roomNum.contains("ID")) {
|
||||||
mID.setText(roomNum);
|
mID.setText(roomNum);
|
||||||
}else {
|
} else {
|
||||||
mID.setText(String.format("ID:%s", roomNum));
|
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")) {
|
if (!StringUtil.isEmpty(goodNumber) && !goodNumber.equals("0")) {
|
||||||
mAnchorLayout.setBackgroundResource(R.drawable.bg_live_anchor_goodnum);
|
mAnchorLayout.setBackgroundResource(R.drawable.bg_live_anchor_goodnum);
|
||||||
|
|
||||||
if (goodNumber.contains("ID")){
|
if (goodNumber.contains("ID")) {
|
||||||
mID.setText(goodNumber);
|
mID.setText(goodNumber);
|
||||||
}else {
|
} else {
|
||||||
mID.setText(String.format("ID:%s", goodNumber));
|
mID.setText(String.format("ID:%s", goodNumber));
|
||||||
}
|
}
|
||||||
mGoodNumberIcon.setVisibility(View.VISIBLE);
|
mGoodNumberIcon.setVisibility(View.VISIBLE);
|
||||||
@ -4652,7 +4658,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
mHandler.removeMessages(WHAT_PK_TIME);
|
mHandler.removeMessages(WHAT_PK_TIME);
|
||||||
}
|
}
|
||||||
isShowGif = false;
|
isShowGif = false;
|
||||||
if(voteManager!=null){
|
if (voteManager != null) {
|
||||||
voteManager.hide();
|
voteManager.hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user