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); } }