修复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);
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,7 +2011,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
}
}
}
public boolean pkHandler = true;
//左上角显示对方主播头像及昵称
public void setOtherInfo(String touids, String url, String name) {
Handler handler = new Handler();

View File

@ -1235,6 +1235,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
if (mLiveRyLinkMicPkPresenter != null) {
mLiveRyLinkMicPkPresenter.onLinkMicPkClose(i);
if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.resetViewGone();
}
}
}