From f26fb83feca3734ed199aa68c36b5d12e59a046f Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Tue, 10 Jan 2023 17:04:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E9=80=81=E7=A4=BC?= =?UTF-8?q?=E5=85=A8=E6=9C=8D=E9=80=9A=E7=9F=A5=E5=B1=95=E7=A4=BA=E5=A4=9A?= =?UTF-8?q?=E4=B8=AA=E7=A4=BC=E7=89=A9=E5=90=8D=E5=AD=97=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/yunbao/common/glide/ImgLoader.java | 1 + .../java/com/yunbao/live/socket/SocketRyClient.java | 1 + .../java/com/yunbao/live/utils/AllMsgTextRender.java | 11 +++++++---- .../com/yunbao/live/views/PortraitLiveManager.java | 11 ++++++----- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/glide/ImgLoader.java b/common/src/main/java/com/yunbao/common/glide/ImgLoader.java index 15ef5591a..4d7882868 100644 --- a/common/src/main/java/com/yunbao/common/glide/ImgLoader.java +++ b/common/src/main/java/com/yunbao/common/glide/ImgLoader.java @@ -239,6 +239,7 @@ public class ImgLoader { public void onResourceReady(@NonNull Drawable resource, @Nullable Transition transition) { if (callback != null) { callback.onLoadSuccess(resource); + } } diff --git a/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java b/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java index 7d27169eb..aa8790693 100644 --- a/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java +++ b/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java @@ -154,6 +154,7 @@ public class SocketRyClient { public void processBroadcast(String socketMsg) { L.e("收到socket--->" + socketMsg); + Log.i("SocketRyClient", "socketMsg" + socketMsg); Log.i("SocketRyClient", "socketMsg" + socketMsg); if (Constants.SOCKET_STOP_PLAY.equals(socketMsg)) { diff --git a/live/src/main/java/com/yunbao/live/utils/AllMsgTextRender.java b/live/src/main/java/com/yunbao/live/utils/AllMsgTextRender.java index 53e515f8b..602dd7cd2 100644 --- a/live/src/main/java/com/yunbao/live/utils/AllMsgTextRender.java +++ b/live/src/main/java/com/yunbao/live/utils/AllMsgTextRender.java @@ -68,10 +68,13 @@ public class AllMsgTextRender { ImgLoader.displayDrawable(context, url, new ImgLoader.DrawableCallback() { @Override public void onLoadSuccess(Drawable drawable) { - builder = createPrefix(drawable, builder); - builder = renderMsg(color2, builder, text); - textView.setText(builder); - giftAnimPresenter.setCountDownTimerEnd(intoIndex); + if (builder!=null&&!builder.toString().contains(text)){ + builder = createPrefix(drawable, builder); + builder = renderMsg(color2, builder, text); + textView.setText(builder); + giftAnimPresenter.setCountDownTimerEnd(intoIndex); + } + } @Override 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 f9bf72956..17a444429 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -696,6 +696,11 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe mLiveRyLinkMicPkPresenter.release(); mLiveRyLinkMicPkPresenter = null; } + if (mLiveEndViewHolder != null) { + mLiveEndViewHolder.removeFromParent(); + mLiveEndViewHolder.release(); + } + mLiveEndViewHolder = null; if (isQuit) { isQuitF = true; if (mLiveAudienceViewHolder != null) { @@ -714,11 +719,7 @@ 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;