修复PK结束后对方头像没隐藏问题

This commit is contained in:
zlzw 2022-12-01 13:19:57 +08:00
parent 4481b102ef
commit 0b1393615c
2 changed files with 25 additions and 10 deletions

View File

@ -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); 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")) { if (!SpUtil.getInstance().getBooleanValue("private_chat_message_switch")) {
msgLayout.setVisibility(View.GONE); msgLayout.setVisibility(View.GONE);
} }
if (!IMLoginManager.get(mContext).hintChat()) { if (!IMLoginManager.get(mContext).hintChat()) {
msgLayout.setVisibility(View.VISIBLE); msgLayout.setVisibility(View.VISIBLE);
} }
if (d_pk_view != null) {
d_pk_view.setVisibility(View.GONE);
}
if (LivePushTxViewHolder.mTRTCCloud != null || LivePushRyViewHolder.rtcRoom != null) { if (LivePushTxViewHolder.mTRTCCloud != null || LivePushRyViewHolder.rtcRoom != null) {
fans_btn.setVisibility(View.GONE); 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(); mBannerList1.clear();
mBannerList2.clear(); mBannerList2.clear();
mBannerList3.clear(); mBannerList3.clear();
mBannerList4.clear(); mBannerList4.clear();
if(d_pk_view!=null){
d_pk_view.setVisibility(View.GONE);
}
updataCleanMic(); updataCleanMic();
initStarChallengeStatus(); 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) { public void setOtherInfo(String touids, String url, String name) {
Handler handler = new Handler(); Handler handler = new Handler();
handler.postDelayed(new Runnable() { handler.postDelayed(new Runnable() {
@Override @Override
public void run() { public void run() {
if(!pkHandler){ if (!pkHandler) {
return; return;
} }
goto_room_view.setVisibility(View.VISIBLE); goto_room_view.setVisibility(View.VISIBLE);

View File

@ -552,7 +552,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
mLiveRoomViewHolder.showPrizePoolLevel(String.valueOf(giftPrizePoolLevel)); 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) { if (mLiveRyLinkMicPkPresenter != null) {
mLiveRyLinkMicPkPresenter.onLinkMicPkClose(i); mLiveRyLinkMicPkPresenter.onLinkMicPkClose(i);
if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.resetViewGone();
}
} }
} }