diff --git a/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java index 272e72fe8..1160fc7da 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java @@ -879,10 +879,14 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl getAiRobotStatus(); MicedUserManager.get().removeAllMicUserList(); MicUserManager.get().removeAllMicUserList(); - //加载整蛊 + if(mLiveRoomViewHolder!=null){ + //加载整蛊 mLiveRoomViewHolder.initPrankProgress(2); mLiveRoomViewHolder.sendMsgPrank(); + + //初始化天梯数据 + mLiveRoomViewHolder.initRankPKInfo(mLiveUid,""); } } diff --git a/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java index bd778906d..d53127356 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java @@ -874,10 +874,14 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl getAiRobotStatus(); MicedUserManager.get().removeAllMicUserList(); MicUserManager.get().removeAllMicUserList(); - //加载整蛊 + if(mLiveRoomViewHolder!=null){ + //加载整蛊 mLiveRoomViewHolder.initPrankProgress(2); mLiveRoomViewHolder.sendMsgPrank(); + + //初始化天梯数据 + mLiveRoomViewHolder.initRankPKInfo(mLiveUid,""); } mLiveSwLinkMicPkPresenter.setmLiveRoomViewHolder(mLiveRoomViewHolder); } 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 708dac4f8..3744f8c74 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -2887,10 +2887,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } private void initPkRankView(PkRankBean bean) { - - if (pkRankVf.getTag() != null) { - return; - } + //因为需要初始化就设置值,所以不设置tag,可以更新数据 +// if (pkRankVf.getTag() != null) { +// return; +// } LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(DpUtil.dp2px(20), DpUtil.dp2px(22)); LinearLayout.LayoutParams textParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); params.leftMargin = DpUtil.dp2px(3); 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 8418373ec..023ba9a98 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -816,6 +816,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe upDataPkScore(pkInfo.getJSONArray("userlist"), pkInfo.getIntValue("drpk_time")); isShowPrank = false; + }else { + //初始化天梯赛数据(不在pk过程中) + mLiveRoomViewHolder.initRankPKInfo(mLiveUid,""); } if (data.getEnterRoomInfo().getGuard() != null) { if (mLiveRoomViewHolder != null) { @@ -902,6 +905,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe } //初始化整蠱列表 mLiveRoomViewHolder.initPrankProgress(isShowPrank?1:2); + } @Override