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 5e73324eb..d357397c7 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -1082,27 +1082,37 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } - public void resetView() { + /** + * 重置该隐藏的view + */ + public void resetViewGone() { goto_room_view.setVisibility(View.GONE); + mPkRankTopIcon.setVisibility(View.GONE); + lt_pk_line.setVisibility(View.GONE); + time.setVisibility(View.GONE); if (!SpUtil.getInstance().getBooleanValue("private_chat_message_switch")) { msgLayout.setVisibility(View.GONE); } if (!IMLoginManager.get(mContext).hintChat()) { msgLayout.setVisibility(View.VISIBLE); } + if (d_pk_view != null) { + d_pk_view.setVisibility(View.GONE); + } if (LivePushTxViewHolder.mTRTCCloud != null || LivePushRyViewHolder.rtcRoom != null) { fans_btn.setVisibility(View.GONE); } - mPkRankTopIcon.setVisibility(View.GONE); - lt_pk_line.setVisibility(View.GONE); - time.setVisibility(View.GONE); + } + + /** + * 重置数据 + */ + public void resetView() { + resetViewGone(); mBannerList1.clear(); mBannerList2.clear(); mBannerList3.clear(); mBannerList4.clear(); - if(d_pk_view!=null){ - d_pk_view.setVisibility(View.GONE); - } updataCleanMic(); initStarChallengeStatus(); } @@ -2001,14 +2011,16 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } } } - public boolean pkHandler=true; + + public boolean pkHandler = true; + //左上角显示对方主播头像及昵称 public void setOtherInfo(String touids, String url, String name) { Handler handler = new Handler(); handler.postDelayed(new Runnable() { @Override public void run() { - if(!pkHandler){ + if (!pkHandler) { return; } goto_room_view.setVisibility(View.VISIBLE); 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 05706b47e..0b603240e 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -552,7 +552,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe mLiveRoomViewHolder.showPrizePoolLevel(String.valueOf(giftPrizePoolLevel)); } } - liveHandler.postDelayed(() -> loading.setVisibility(View.GONE),700); + liveHandler.postDelayed(() -> loading.setVisibility(View.GONE), 700); } @@ -1235,6 +1235,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe if (mLiveRyLinkMicPkPresenter != null) { mLiveRyLinkMicPkPresenter.onLinkMicPkClose(i); + if (mLiveRoomViewHolder != null) { + mLiveRoomViewHolder.resetViewGone(); + } } }