From 4d3a360a09bf6a85bf44ebdd064649b15bf5f01a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E7=9A=AE?= <14840170+lao-pi123@user.noreply.gitee.com> Date: Sat, 2 Nov 2024 14:37:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=AF=E5=90=A6=E6=9C=89=E5=85=8D=E8=B4=B9?= =?UTF-8?q?=E7=A4=BC=E7=89=A9=E7=9A=84=E5=88=A4=E6=96=AD=E6=9B=B4=E6=8D=A2?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunbao/live/views/LiveRoomViewHolder.java | 12 +++++++++--- .../yunbao/live/views/LiveRyAnchorViewHolder.java | 8 +++++++- 2 files changed, 16 insertions(+), 4 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 c30b863b6..182f31fa1 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -892,6 +892,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } } + // 左下角免费礼物svga动画 private void svga_new_user_gif() { svga_new_user_gif.setVisibility(View.VISIBLE); new SVGAParser(mContext).decodeFromAssets("free_gift_tip.svga", new SVGAParser.ParseCompletion() { @@ -5339,6 +5340,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis public void configBanner3(NewPeopleTaskModel newPeopleTask) { TaskModel taskModel = newPeopleTask.getTask(); + String isFreeGift = newPeopleTask.getIs_free_gift(); + if (taskModel != null) { GiftModel giftModel = newPeopleTask.getGift(); if (giftModel != null) { @@ -5354,14 +5357,16 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis bean1.setTag("1"); bean1.setPrice(WordUtil.isNewZh() ? "免费" : "free"); if (!IMLoginManager.get(mContext).isisNewUserOne()) { - if (TextUtils.equals(taskModel.getSendgift(), "0")) { +// if (TextUtils.equals(taskModel.getSendgift(), "0")) { + if (TextUtils.equals(isFreeGift, "0")) { IMLoginManager.get(mContext).setNewUserGif(true); EventBus.getDefault().post("svga_new_user_gif"); } } BannerBean banner3Bean = new BannerBean(); banner3Bean.setImageUrl("https://downs.yaoulive.com/live_Mission_box.png"); - banner3Bean.setLink(taskModel.getSendgift()); + banner3Bean.setLink(isFreeGift); +// banner3Bean.setLink(taskModel.getSendgift()); mBannerList3.add(banner3Bean); @@ -5375,7 +5380,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis banner3Bean2.setLink(taskModel.getIllumine()); mBannerList3.add(banner3Bean2); - if (TextUtils.equals(taskModel.getSendgift(), "0") && !IMLoginManager.get(mContext).isisNewUserOne()) { + // taskModel.getSendgift() + if (TextUtils.equals(isFreeGift, "0") && !IMLoginManager.get(mContext).isisNewUserOne()) { showBanner3(bean1); } else if (TextUtils.equals(taskModel.getAttent(), "0") && !IMLoginManager.get(mContext).isisNewUserOne()) { showBanner3(bean1); diff --git a/live/src/main/java/com/yunbao/live/views/LiveRyAnchorViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRyAnchorViewHolder.java index 57d774bec..72fd3921b 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRyAnchorViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRyAnchorViewHolder.java @@ -97,6 +97,12 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder { this.drpkRoomId = drpkRoomId; } + + /** + * 1、IM 收到别的主播发来的PK申请同意后显示 + * 2、收到别的主播加入多人PK房间后显示 + * 3、多人PK倒计时结束后显示 + * */ public void showEndPkBt() { if (btn_end_pk_dr != null) { if (btn_start_dr_pk_view.getVisibility() == View.GONE) { @@ -204,7 +210,7 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder { } }); - // 被邀请人退出多人PK + // 被邀请人 退出多人PK btn_end_pk_dr.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) {