From 291492f2d0935ba2a8d432a0dd0b514fd7600f23 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Tue, 4 Jul 2023 16:29:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../live/dialog/ReceiveRendPacketPopup.java | 25 ++++++++++++++----- .../yunbao/live/views/LiveRoomViewHolder.java | 3 --- live/src/main/res/layout/view_red_packet.xml | 7 +++--- 3 files changed, 23 insertions(+), 12 deletions(-) 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 1b651018b..6432ac392 100644 --- a/live/src/main/java/com/yunbao/live/dialog/ReceiveRendPacketPopup.java +++ b/live/src/main/java/com/yunbao/live/dialog/ReceiveRendPacketPopup.java @@ -29,6 +29,7 @@ import com.yunbao.common.views.weight.ClipPathCircleImage; import com.yunbao.common.views.weight.ViewClicksAntiShake; import com.yunbao.live.R; import com.yunbao.live.adapter.RedPacketGiftAdapter; +import com.yunbao.live.views.LiveRoomViewHolder; public class ReceiveRendPacketPopup extends CenterPopupView { private CircleProgress circleProgress; @@ -174,17 +175,29 @@ public class ReceiveRendPacketPopup extends CenterPopupView { } }); } else { + LiveRoomViewHolder.follow(); LiveNetManager.get(getContext()) .getRedPacket(mLiveUid, stream, redPacketId, new HttpCallback() { @Override public void onSuccess(RedPacketInfoModel data) { + dismiss(); - new XPopup.Builder(getContext()) - .asCustom(new ResultRendPacketPopup(getContext(), - false, - data.setRedPacketId(redPacketId), - isSuperJackpot)) - .show(); + if (data.getGiftModels().size() > 0) { + new XPopup.Builder(getContext()) + .asCustom(new ResultRendPacketPopup(getContext(), + false, + data.setRedPacketId(redPacketId), + isSuperJackpot)) + .show(); + } else { + new XPopup.Builder(getContext()) + .asCustom(new ResultRendPacketPopup(getContext(), + true, + null, + isSuperJackpot)) + .show(); + } + } @Override 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 88004e20c..1c91bd117 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -1483,9 +1483,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis .asCustom(new ResultRendPacketPopup(mContext, false, data.setRedPacketId(redPacketModel.getRedPacketId()), false)) .show(); } - if (TextUtils.equals(data.getConditions(), "1")) { - follow(); - } } @Override diff --git a/live/src/main/res/layout/view_red_packet.xml b/live/src/main/res/layout/view_red_packet.xml index 688018c29..fb80f6b5e 100644 --- a/live/src/main/res/layout/view_red_packet.xml +++ b/live/src/main/res/layout/view_red_packet.xml @@ -16,14 +16,15 @@ + android:textSize="9sp" + android:visibility="gone" />