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 85f0ef2d0..e12f547e0 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -2459,9 +2459,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } pkRankLayout.setTag(mLiveUid); pkUidTmp = pkUid; - mRedVal.setVisibility(View.GONE); - mBlueVal.setVisibility(View.GONE); - mPkRankTopIcon.setVisibility(View.GONE); new LoadDian9TuUtil().loadDian9TuAssets2(mContext, liveRankPk2, "rectangle_new.png", 1); } @@ -2491,7 +2488,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } } - public void initRankPKInfo(String mLiveUid) { + public void initRankPKInfo(String mLiveUid,String pkUid) { LiveNetManager.get(mContext) .getRandomPk(mLiveUid, pkUid, new com.yunbao.common.http.base.HttpCallback() { @Override @@ -2849,6 +2846,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis pkUid = ""; goto_room_view.setVisibility(View.GONE); livePKUserListBean = new LivePKUserListBean(); + mRedVal.setVisibility(View.GONE); + mBlueVal.setVisibility(View.GONE); + mPkRankTopIcon.setVisibility(View.GONE); } /** diff --git a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java index b3d43a797..6f8dc6ea3 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -501,8 +501,6 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe mLiveRoomViewHolder.setUserList(data.getEnterRoomInfo().getUserlists()); //设置靓号 mLiveRoomViewHolder.setAnchorGoodNumber(data.getLiveInfo().getGoodnum()); - //初始化天梯赛信息 - mLiveRoomViewHolder.initRankPKInfo(String.valueOf(data.getLiveInfo().getUid())); if (!StringUtil.isEmpty(mLiveBean.getGiftId())) { mLiveRoomViewHolder.openGiftDialog(mLiveBean.getGiftId()); } @@ -625,6 +623,8 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe pkInfo = JSON.parseObject(GsonUtils.toJson(data.getEnterRoomInfo().getPkinfo())); if (pkInfo != null && pkInfo.getIntValue("drpk_status") != 1) { String pkUid = pkInfo.getString("pkuid"); + //初始化天梯赛信息 + mLiveRoomViewHolder.initRankPKInfo(String.valueOf(data.getLiveInfo().getUid()),pkUid); anyway = "1"; if (!TextUtils.isEmpty(pkUid) && !"0".equals(pkUid) && anyway.equals("0")) { if (mLiveSDK != Constants.LIVE_SDK_TX) {