修复Ranking.getAnchorRankData多次调用问题
This commit is contained in:
parent
6603a2dbb5
commit
af8052f65b
@ -341,7 +341,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
private TextView mPkRankText;
|
||||
private ImageView mPkRankTopIcon;
|
||||
private TextView mRedVal, mBlueVal;
|
||||
private String pkUid = "";
|
||||
public String pkUid = "";
|
||||
|
||||
//接口整合新加参数
|
||||
private GuardUserModel guardUserModel;
|
||||
@ -2092,13 +2092,19 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
initPkRank(null);
|
||||
}
|
||||
|
||||
private String pkUidTmp ="";
|
||||
private String pkUidTmp = "";
|
||||
|
||||
public void initPkRank(String isLadders) {
|
||||
if (pkUidTmp.equals(pkUid)) {
|
||||
//PK状态下,pkuid不能为空
|
||||
if (((LiveAudienceActivity) mContext).isPkStatus() && pkUidTmp.equals(pkUid) && !StringUtil.isEmpty(pkUid)) {
|
||||
return;
|
||||
}
|
||||
pkUidTmp=pkUid;
|
||||
//非PK状态下,第一次调用通过
|
||||
if (pkRankLayout.getTag() != null && pkRankLayout.getTag().equals(mLiveUid)) {
|
||||
return;
|
||||
}
|
||||
pkRankLayout.setTag(mLiveUid);
|
||||
pkUidTmp = pkUid;
|
||||
pkRankLayout.setVisibility(View.GONE);
|
||||
new LoadDian9TuUtil().loadDian9TuAssets2(mContext, liveRankPk2, "rectangle_new.png", 1);
|
||||
mRedVal.setVisibility(View.GONE);
|
||||
|
@ -594,6 +594,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
} else if (!pkInfo.getString("end_pk_time").equals("0")) {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
mLiveRoomViewHolder.pkHandler = true;
|
||||
mLiveRoomViewHolder.pkUid=pkUid;
|
||||
mLiveRoomViewHolder.initPkRank(null);
|
||||
}
|
||||
if (mLivePlayViewHolder != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user