From 6f3dd58a8b8fc66dd8f83c174f7cc989662ad699 Mon Sep 17 00:00:00 2001 From: Martin <13046765170@163.com> Date: Fri, 6 Sep 2024 15:23:41 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=88=A4=E6=96=AD-push?= =?UTF-8?q?=EF=BC=8Cim=20=E6=98=AF=E6=96=B0=E7=94=A8=E6=88=B7=E6=89=8D?= =?UTF-8?q?=E4=BC=9A=E6=8E=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../live/views/PortraitLiveManager.java | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) 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 d2e572d22..cdf8a051e 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -910,16 +910,18 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe L.e("getIsFirstEntry:"+data.getEnterRoomInfo().getIsFirstEntry()); L.e("getIsNewUser:"+data.getEnterRoomInfo().getIsNewUser()); L.e("getIsattention:"+data.getEnterRoomInfo().getIsattention()); - //检测是否是首次观看该直播间 - if(data.getEnterRoomInfo().getIsFirstEntry().equals("1")&&data.getEnterRoomInfo().getIsNewUser().equals("1")){ - mLiveRoomViewHolder.firstLookLiveNotify(); + if(data.getEnterRoomInfo().getIsNewUser().equals("1")){ + //检测是否是首次观看该直播间 + if(data.getEnterRoomInfo().getIsFirstEntry().equals("1")){ + mLiveRoomViewHolder.firstLookLiveNotify(); + } + //判断是否有免费礼物 + if(data.getNewPeopleTask().getTask().getSendgift().equals("0")){ + mLiveRoomViewHolder.firstLook5MinLiveNotify(); + } + //观看200秒之后,推送活动入口im消息 + mLiveRoomViewHolder.firstTaskInlet1Notify(); } - //判断是否有免费礼物 - if(data.getNewPeopleTask().getTask().getSendgift().equals("0")){ - mLiveRoomViewHolder.firstLook5MinLiveNotify(); - } - //观看200秒之后,推送活动入口im消息 - mLiveRoomViewHolder.firstTaskInlet1Notify(); } @Override From 2d6f801f0bed95718af4d9f40e655455dc7b8514 Mon Sep 17 00:00:00 2001 From: Martin <13046765170@163.com> Date: Fri, 6 Sep 2024 17:15:28 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D-=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E4=BA=86=EF=BC=8C=E6=B3=A8=E9=87=8A=E6=8E=89?= =?UTF-8?q?=E4=BA=86=E7=BA=A2=E5=8C=85=E7=A5=9E=E9=BE=99=EF=BC=8C=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E4=BD=8D=E7=BD=AE=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/live/views/LiveRoomViewHolder.java | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) 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 adb719a8b..a5a44b964 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -2635,16 +2635,16 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } } else { redPacket.setVisibility(View.GONE); - if (dragonImmediateParticipation.getVisibility() == View.VISIBLE) { - RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); + /*if (dragonImmediateParticipation.getVisibility() == View.VISIBLE) { + LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(160); dragonImmediateParticipation.setLayoutParams(layoutParams); } if (dragonImmediateParticipationTime.getVisibility() == View.VISIBLE) { - RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); + LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(160); dragonImmediateParticipationTime.setLayoutParams(layoutParams); - } + }*/ anchorTimeHandler.removeCallbacks(anchorTimeRunnable); LiveNetManager.get(mContext).endRedPacket(mLiveUid, mRedPacketModel.getRedPacketId(), new com.yunbao.common.http.base.HttpCallback() { @Override @@ -2670,27 +2670,27 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis mRedPacketModel = redPacketModel; if (redPacketModel.getIsShow() == 1) { redPacket.setVisibility(View.VISIBLE); - if (dragonImmediateParticipation.getVisibility() == View.VISIBLE) { - RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); + /*if (dragonImmediateParticipation.getVisibility() == View.VISIBLE) { + LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(240); dragonImmediateParticipation.setLayoutParams(layoutParams); } if (dragonImmediateParticipationTime.getVisibility() == View.VISIBLE && mContext instanceof LiveRyAnchorActivity || mContext instanceof LiveSwAnchorActivity) { - RelativeLayout.LayoutParams layoutParamsredPacket = (RelativeLayout.LayoutParams) redPacket.getLayoutParams(); + LinearLayout.LayoutParams layoutParamsredPacket = (LinearLayout.LayoutParams) redPacket.getLayoutParams(); layoutParamsredPacket.topMargin = DpUtil.dp2px(160); redPacket.setLayoutParams(layoutParamsredPacket); - RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipationTime.getLayoutParams(); + LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) dragonImmediateParticipationTime.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(240); dragonImmediateParticipationTime.setLayoutParams(layoutParams); } if (mContext instanceof LiveRyAnchorActivity || mContext instanceof LiveSwAnchorActivity) { if (dragonImmediateParticipationTime.getVisibility() == View.GONE) { - RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) redPacket.getLayoutParams(); + LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) redPacket.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(160); redPacket.setLayoutParams(layoutParams); } - } + }*/ if (redPacketModel.getCountdown() > 180) { redPacketQueue.setVisibility(View.GONE); redPacketCountdown.setVisibility(View.VISIBLE); @@ -2751,16 +2751,16 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis public void hindeRedPacket() { redPacket.setVisibility(View.GONE); - if (dragonImmediateParticipation.getVisibility() == View.VISIBLE) { + /* if (dragonImmediateParticipation.getVisibility() == View.VISIBLE) { RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(160); dragonImmediateParticipation.setLayoutParams(layoutParams); } if (dragonImmediateParticipationTime.getVisibility() == View.VISIBLE) { - RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipationTime.getLayoutParams(); + LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) dragonImmediateParticipationTime.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(160); dragonImmediateParticipationTime.setLayoutParams(layoutParams); - } + }*/ } public void setRedPacketInfoModel(RedPacketInfoModel redPacket) { @@ -4073,7 +4073,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis sendMoneyTime = Long.parseLong(sendMoneyLongModel.getCountdown()); participation_time.removeCallbacks(sendMoneyRunnable); dragonImmediateParticipationTime.setVisibility(View.VISIBLE); - if (redPacket.getVisibility() == View.VISIBLE) { + /*if (redPacket.getVisibility() == View.VISIBLE) { RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(240); dragonImmediateParticipationTime.setLayoutParams(layoutParams); @@ -4081,13 +4081,13 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(160); dragonImmediateParticipationTime.setLayoutParams(layoutParams); - } + }*/ String s1 = StringUtil.getDurationText(sendMoneyTime * 1000); participation_time.setText(s1); participation_time.post(sendMoneyRunnable); } else { dragonImmediateParticipation.setVisibility(View.VISIBLE); - if (redPacket.getVisibility() == View.VISIBLE) { + /*if (redPacket.getVisibility() == View.VISIBLE) { RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(240); dragonImmediateParticipation.setLayoutParams(layoutParams); @@ -4095,7 +4095,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(160); dragonImmediateParticipation.setLayoutParams(layoutParams); - } + }*/ } } @@ -4103,7 +4103,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis public void onSendMoneyLongEndEvent(SendMoneyLongEndEvent moneyLongEndEvent) { if (mLiveUid.contains(String.valueOf(IMLoginManager.get(mContext).getUserInfo().getId()))) { dragonImmediateParticipationTime.setVisibility(View.GONE); - if (redPacket.getVisibility() == View.VISIBLE) { + /*if (redPacket.getVisibility() == View.VISIBLE) { RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(190); dragonImmediateParticipationTime.setLayoutParams(layoutParams); @@ -4111,7 +4111,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(160); dragonImmediateParticipationTime.setLayoutParams(layoutParams); - } + }*/ } else { dragonImmediateParticipation.setVisibility(View.GONE); @@ -4145,7 +4145,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis }; public void onSendMoneyLong() { - dragonImmediateParticipation.setVisibility(View.VISIBLE); + /*dragonImmediateParticipation.setVisibility(View.VISIBLE); if (redPacket.getVisibility() == View.VISIBLE) { RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(240); @@ -4154,7 +4154,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(110); dragonImmediateParticipation.setLayoutParams(layoutParams); - } + }*/ } /**