是否有免费礼物的判断更换字段

This commit is contained in:
老皮 2024-11-02 14:37:20 +08:00
parent ff9e2de819
commit 4d3a360a09
2 changed files with 16 additions and 4 deletions

View File

@ -892,6 +892,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
} }
} }
// 左下角免费礼物svga动画
private void svga_new_user_gif() { private void svga_new_user_gif() {
svga_new_user_gif.setVisibility(View.VISIBLE); svga_new_user_gif.setVisibility(View.VISIBLE);
new SVGAParser(mContext).decodeFromAssets("free_gift_tip.svga", new SVGAParser.ParseCompletion() { 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) { public void configBanner3(NewPeopleTaskModel newPeopleTask) {
TaskModel taskModel = newPeopleTask.getTask(); TaskModel taskModel = newPeopleTask.getTask();
String isFreeGift = newPeopleTask.getIs_free_gift();
if (taskModel != null) { if (taskModel != null) {
GiftModel giftModel = newPeopleTask.getGift(); GiftModel giftModel = newPeopleTask.getGift();
if (giftModel != null) { if (giftModel != null) {
@ -5354,14 +5357,16 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
bean1.setTag("1"); bean1.setTag("1");
bean1.setPrice(WordUtil.isNewZh() ? "免费" : "free"); bean1.setPrice(WordUtil.isNewZh() ? "免费" : "free");
if (!IMLoginManager.get(mContext).isisNewUserOne()) { 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); IMLoginManager.get(mContext).setNewUserGif(true);
EventBus.getDefault().post("svga_new_user_gif"); EventBus.getDefault().post("svga_new_user_gif");
} }
} }
BannerBean banner3Bean = new BannerBean(); BannerBean banner3Bean = new BannerBean();
banner3Bean.setImageUrl("https://downs.yaoulive.com/live_Mission_box.png"); banner3Bean.setImageUrl("https://downs.yaoulive.com/live_Mission_box.png");
banner3Bean.setLink(taskModel.getSendgift()); banner3Bean.setLink(isFreeGift);
// banner3Bean.setLink(taskModel.getSendgift());
mBannerList3.add(banner3Bean); mBannerList3.add(banner3Bean);
@ -5375,7 +5380,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
banner3Bean2.setLink(taskModel.getIllumine()); banner3Bean2.setLink(taskModel.getIllumine());
mBannerList3.add(banner3Bean2); 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); showBanner3(bean1);
} else if (TextUtils.equals(taskModel.getAttent(), "0") && !IMLoginManager.get(mContext).isisNewUserOne()) { } else if (TextUtils.equals(taskModel.getAttent(), "0") && !IMLoginManager.get(mContext).isisNewUserOne()) {
showBanner3(bean1); showBanner3(bean1);

View File

@ -97,6 +97,12 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
this.drpkRoomId = drpkRoomId; this.drpkRoomId = drpkRoomId;
} }
/**
* 1IM 收到别的主播发来的PK申请同意后显示
* 2收到别的主播加入多人PK房间后显示
* 3多人PK倒计时结束后显示
* */
public void showEndPkBt() { public void showEndPkBt() {
if (btn_end_pk_dr != null) { if (btn_end_pk_dr != null) {
if (btn_start_dr_pk_view.getVisibility() == View.GONE) { if (btn_start_dr_pk_view.getVisibility() == View.GONE) {