From 0b1393615ce4441f694083505878d61ae9f62e77 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Thu, 1 Dec 2022 13:19:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DPK=E7=BB=93=E6=9D=9F=E5=90=8E?= =?UTF-8?q?=E5=AF=B9=E6=96=B9=E5=A4=B4=E5=83=8F=E6=B2=A1=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/live/views/LiveRoomViewHolder.java | 30 +++++++++++++------ .../live/views/PortraitLiveManager.java | 5 +++- 2 files changed, 25 insertions(+), 10 deletions(-) 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(); + } } }