From 420573736d2a76079a124ace869d59fab38a42c9 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Tue, 10 Jan 2023 17:22:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E7=9B=B4=E6=92=AD?= =?UTF-8?q?=E7=BB=93=E6=9D=9F=E6=BB=9A=E5=8A=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../live/views/PortraitLiveManager.java | 27 ++++++++----------- 1 file changed, 11 insertions(+), 16 deletions(-) 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); }