diff --git a/live/src/main/java/com/yunbao/live/dialog/ReceiveRendPacketPopup.java b/live/src/main/java/com/yunbao/live/dialog/ReceiveRendPacketPopup.java index f09291b2c..fc6da76a3 100644 --- a/live/src/main/java/com/yunbao/live/dialog/ReceiveRendPacketPopup.java +++ b/live/src/main/java/com/yunbao/live/dialog/ReceiveRendPacketPopup.java @@ -46,10 +46,13 @@ public class ReceiveRendPacketPopup extends CenterPopupView { private ImageView isAttention; private RedPacketInfoModel redPacketInfoModel; private boolean isSuperJackpot; + private boolean isFans=false; public ReceiveRendPacketPopup(@NonNull Context context, int time, String mLiveUid, String stream, String redPacketId, RedPacketInfoModel redPacketInfoModel, - boolean isSuperJackpot) { + boolean isSuperJackpot, + boolean isFans + ) { super(context); this.time = time; @@ -58,7 +61,7 @@ public class ReceiveRendPacketPopup extends CenterPopupView { this.redPacketId = redPacketId; this.redPacketInfoModel = redPacketInfoModel; this.isSuperJackpot = isSuperJackpot; - + this.isFans=isFans; } // 返回自定义弹窗的布局离开 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 4e780859d..0f5bbb444 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -374,6 +374,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis public SVGAImageView svga_new_user_gif, svga_new_user_double, svga_new_user_follow; private String mAnchorName;//主播名字 private boolean isHinde = false; + private boolean isFans=false; @Subscribe(threadMode = ThreadMode.MAIN) public void onUpdata(String str) { @@ -1509,7 +1510,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis if (TextUtils.equals(data.getReceiveStatus(), "0")) { redTimeCountdown = redTimeCountdown - 1; new XPopup.Builder(mContext) - .asCustom(new ReceiveRendPacketPopup(mContext, redTimeCountdown, mLiveUid, mStream, redPacketModel.getRedPacketId(), data, false)) + .asCustom(new ReceiveRendPacketPopup(mContext, redTimeCountdown, mLiveUid, mStream, redPacketModel.getRedPacketId(), data, false,isFans)) .show(); } else if (TextUtils.equals(data.getReceiveStatus(), "1")) { new XPopup.Builder(mContext) @@ -1546,7 +1547,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis public void setRedPacketInfoModel(RedPacketInfoModel redPacket) { new XPopup.Builder(mContext) - .asCustom(new ReceiveRendPacketPopup(mContext, 0, mLiveUid, mStream, redPacket.getRedPacketId(), redPacket, true)) + .asCustom(new ReceiveRendPacketPopup(mContext, 0, mLiveUid, mStream, redPacket.getRedPacketId(), redPacket, true,isFans)) .show(); } @@ -3941,6 +3942,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis voteManager.setCreateVoteModel(voteModel); } + public void setFansGroup(String isFans) { + this.isFans=isFans.equals("1"); + } + private static class LiveRoomHandler extends Handler { 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 d4b8cdb8d..08fe91972 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -520,6 +520,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe mLiveRoomViewHolder.updateTopBanner(); mLiveRoomViewHolder.setVoteData(data.getEnterRoomInfo().getVoteModel()); mLiveRoomViewHolder.updateFansMessageRed(); + mLiveRoomViewHolder.setFansGroup(data.getEnterRoomInfo().getIsFans()); isattention = Integer.parseInt(data.getEnterRoomInfo().getIsattention()); if (isattention == 0) {