From f9d26a6d562b8869b0c24a7681a93389cd148881 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Thu, 1 Sep 2022 15:12:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E6=92=AD=E5=BC=80=E6=92=AD=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/com/shayu/phonelive/AppContext.java | 5 +++++ .../java/com/yunbao/live/activity/LiveAudienceActivity.java | 4 +++- .../main/java/com/yunbao/live/views/LiveRoomViewHolder.java | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/shayu/phonelive/AppContext.java b/app/src/main/java/com/shayu/phonelive/AppContext.java index b4b8498b4..a8375fc82 100644 --- a/app/src/main/java/com/shayu/phonelive/AppContext.java +++ b/app/src/main/java/com/shayu/phonelive/AppContext.java @@ -175,11 +175,16 @@ public class AppContext extends CommonAppContext { TextMessage content = (TextMessage) message.getContent(); if (content.getContent().contains("_method_")) { msg.obj = content.getContent(); + //观众页面 if (SocketRyClient.mSocketHandler != null && (TextUtils.equals("__system__", message.getTargetId()) || ("g" + PortraitLiveManager.liveID).contains(message.getTargetId()))) { SocketRyClient.mSocketHandler.sendMessage(msg); } + //主播页面 + if (TextUtils.isEmpty(PortraitLiveManager.liveID) && SocketRyClient.mSocketHandler != null) { + SocketRyClient.mSocketHandler.sendMessage(msg); + } } } } catch (Exception e) { diff --git a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java index 22166c9b8..eca917db9 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java @@ -158,7 +158,8 @@ public class LiveAudienceActivity extends LiveActivity { } public static LiveRoomPlayViewHolder getmLivePlayViewHolder() { - return manager.getmLivePlayViewHolder(); + + return manager == null ? null : manager.getmLivePlayViewHolder(); } public static void setCurrentItem(int index) { @@ -384,6 +385,7 @@ public class LiveAudienceActivity extends LiveActivity { LiveHttpUtil.cancel(LiveHttpConsts.ENTER_ROOM); LiveHttpUtil.cancel(LiveHttpConsts.ROOM_CHARGE); CommonHttpUtil.cancel(CommonHttpConsts.GET_BALANCE); + PortraitLiveManager.liveID = ""; super.release(); } diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index dee0c6ec6..3ad320a14 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -882,6 +882,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis findViewById(R.id.live_wks_layout).setVisibility(View.GONE); findViewById(R.id.wish_list_layout).setVisibility(View.GONE); findViewById(R.id.open_sidebar).setVisibility(View.GONE); + findViewById(R.id.btn_follow).setVisibility(View.GONE); } }