修复:修改进入PK房退出以后闪退问题

This commit is contained in:
18401019693 2022-12-15 16:23:33 +08:00
parent 51186169ca
commit 269f6c64a9

View File

@ -306,7 +306,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
} }
}); });
mLiveRoomViewHolder.resetView(); mLiveRoomViewHolder.resetView();
linkMicPkStartHandler.removeCallbacks(linkMicPkStartRunnable);
mLiveRoomViewHolder.setAvatar(data.getAvatar()); mLiveRoomViewHolder.setAvatar(data.getAvatar());
mLiveRoomViewHolder.setAnchorLevel(data.getLevelAnchor()); mLiveRoomViewHolder.setAnchorLevel(data.getLevelAnchor());
mLiveRoomViewHolder.setName(data.getUserNiceName()); mLiveRoomViewHolder.setName(data.getUserNiceName());
@ -505,7 +505,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
linkMicPkStartRunnable = new Runnable() { linkMicPkStartRunnable = new Runnable() {
@Override @Override
public void run() { public void run() {
if (pkInfo!=null&&pkInfo.containsKey("pkuid")&&pkInfo.containsKey("pkuimg")&&pkInfo.containsKey("pkuname")){ if (mLiveRoomViewHolder != null && pkInfo != null && pkInfo.containsKey("pkuid") && pkInfo.containsKey("pkuimg") && pkInfo.containsKey("pkuname")) {
mLiveRoomViewHolder.setOtherInfo(pkInfo.getString("pkuid"), pkInfo.getString("pkuimg"), pkInfo.getString("pkuname")); mLiveRoomViewHolder.setOtherInfo(pkInfo.getString("pkuid"), pkInfo.getString("pkuimg"), pkInfo.getString("pkuname"));
} }
@ -621,6 +621,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
public void onRemove(boolean isQuit) { public void onRemove(boolean isQuit) {
LiveNetManager.get(mContext).cancelLive(); LiveNetManager.get(mContext).cancelLive();
liveHandler.removeCallbacks(sendFIm); liveHandler.removeCallbacks(sendFIm);
linkMicPkStartHandler.removeCallbacks(linkMicPkStartRunnable);
LiveHttpUtil.cancel(LiveHttpConsts.CHECK_LIVE); LiveHttpUtil.cancel(LiveHttpConsts.CHECK_LIVE);
LiveHttpUtil.cancel(LiveHttpConsts.ENTER_ROOM); LiveHttpUtil.cancel(LiveHttpConsts.ENTER_ROOM);
LiveHttpUtil.cancel(LiveHttpConsts.ROOM_CHARGE); LiveHttpUtil.cancel(LiveHttpConsts.ROOM_CHARGE);