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 4c0b4891d..154369138 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -624,8 +624,12 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe public void removeLiveEnd() { + if (mLiveEndViewHolder != null) { + mLiveEndViewHolder.removeFromParent(); + mLiveEndViewHolder.release(); + } + mLiveEndViewHolder = null; if (mLiveAudienceViewHolder != null) { - mLiveAudienceViewHolder.removeFromParent(); mLiveAudienceViewHolder.removeCallbacks(); mLiveAudienceViewHolder.release(); @@ -641,17 +645,12 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe mLiveRoomViewHolder.clearData(); mLiveRoomViewHolder.countDownTimerTrickery = null; } - if (mLiveEndViewHolder != null) { - mLiveEndViewHolder.removeFromParent(); - mLiveEndViewHolder.release(); - } - mLiveEndViewHolder = null; mLiveAudienceViewHolder = null; - mLivePlayViewHolder = null; mLiveRoomViewHolder = null; mLiveLinkMicPresenter = null; mLiveLinkMicAnchorPresenter = null; mLiveRyLinkMicPkPresenter = null; + mLivePlayViewHolder = null; } @Override @@ -670,27 +669,24 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe if (mLiveAudienceViewHolder != null) { mLiveAudienceViewHolder.removeCallbacks(); } - //断开socket - - if (mSocketRyClient != null) { mSocketRyClient.disConnect(); mSocketRyClient = null; } - if (mSocketClient != null) { mSocketClient.disConnect(); mSocketClient = null; } - if (mLiveLinkMicPresenter != null) { mLiveLinkMicPresenter.clearData(); mLiveLinkMicPresenter.release(); + mLiveLinkMicPresenter = null; } if (mLiveLinkMicAnchorPresenter != null) { mLiveLinkMicAnchorPresenter.clearData(); mLiveLinkMicAnchorPresenter.release(); + mLiveLinkMicAnchorPresenter = null; } if (mLiveRyLinkMicPkPresenter != null) { mLiveRyLinkMicPkPresenter.clearData(); @@ -698,10 +694,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe mLiveRyLinkMicPkPresenter = null; } if (mLiveEndViewHolder != null) { - mLiveEndViewHolder.removeFromParent(); - mLiveEndViewHolder.release(); + removeLiveEnd(); } - mLiveEndViewHolder = null; + if (isQuit) { isQuitF = true; if (mLiveAudienceViewHolder != null) { @@ -1809,7 +1804,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe /** * 幸运100%活动 */ - public void lucky100(MsgModel model){ + public void lucky100(MsgModel model) { if (mLiveRoomViewHolder != null) { mLiveRoomViewHolder.lucky100(model); }