From 744de267ddb7a46b332a34f432978dab97c802fe Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Tue, 29 Nov 2022 10:18:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=96=B0=E4=BA=BA=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E7=9A=84=E5=88=A4=E6=96=AD=E9=80=BB=E8=BE=91=EF=BC=8C?= =?UTF-8?q?=E8=B4=B5=E6=97=8F=E9=80=9A=E7=9F=A5=E5=88=87=E6=8D=A2=E7=9B=B4?= =?UTF-8?q?=E6=92=AD=E9=97=B4=E7=9A=84=E9=80=BB=E8=BE=91=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/common/bean/EnterRoomNewModel.java | 19 ++--- .../common/bean/NewPeopleTaskModel.java | 8 +- .../common/views/weight/NobleNoticeView.java | 3 - config.gradle | 4 +- .../yunbao/live/activity/LiveActivity.java | 24 +++--- .../yunbao/live/views/LiveRoomViewHolder.java | 78 ++++++++++--------- 6 files changed, 69 insertions(+), 67 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/bean/EnterRoomNewModel.java b/common/src/main/java/com/yunbao/common/bean/EnterRoomNewModel.java index e07c1c5eb..b8245fe3f 100644 --- a/common/src/main/java/com/yunbao/common/bean/EnterRoomNewModel.java +++ b/common/src/main/java/com/yunbao/common/bean/EnterRoomNewModel.java @@ -2,6 +2,7 @@ package com.yunbao.common.bean; import com.google.gson.annotations.SerializedName; +import java.util.ArrayList; import java.util.List; /** @@ -10,23 +11,23 @@ import java.util.List; public class EnterRoomNewModel extends BaseModel { @SerializedName("liveInfo") - private LiveInfoModel liveInfo;//直播间信息 + private LiveInfoModel liveInfo = new LiveInfoModel();//直播间信息 @SerializedName("enterRoomInfo") - private EnterRoomInfoModel enterRoomInfo;//原接口进入直播间数据返回 + private EnterRoomInfoModel enterRoomInfo = new EnterRoomInfoModel();//原接口进入直播间数据返回 @SerializedName("rankHour") - private RankHourModel rankHour;//.热度卡 + private RankHourModel rankHour = new RankHourModel();//.热度卡 @SerializedName("newPeopleTask") - private NewPeopleTaskModel newPeopleTask;//新人任务 + private NewPeopleTaskModel newPeopleTask = new NewPeopleTaskModel();//新人任务 @SerializedName("wishList") - private WishListModel wishList;//心愿单 + private WishListModel wishList = new WishListModel();//心愿单 @SerializedName("guardUser") - private GuardUserModel guardUserAvatar;//守护 + private GuardUserModel guardUserAvatar = new GuardUserModel();//守护 @SerializedName("activeList") - private List activeList;//活动列表 + private List activeList = new ArrayList<>();//活动列表 @SerializedName("isUseHotCard") - private String isUseHotCard;//是否使用热度卡 + private String isUseHotCard = "";//是否使用热度卡 @SerializedName("liveRoomActivity") - private List liveRoomActivityModels;//活动列表 + private List liveRoomActivityModels = new ArrayList<>();//活动列表 public List getLiveRoomActivityModels() { return liveRoomActivityModels; diff --git a/common/src/main/java/com/yunbao/common/bean/NewPeopleTaskModel.java b/common/src/main/java/com/yunbao/common/bean/NewPeopleTaskModel.java index e5e4114c7..6d45fc3e2 100644 --- a/common/src/main/java/com/yunbao/common/bean/NewPeopleTaskModel.java +++ b/common/src/main/java/com/yunbao/common/bean/NewPeopleTaskModel.java @@ -5,13 +5,13 @@ import com.google.gson.annotations.SerializedName; public class NewPeopleTaskModel extends BaseModel { @SerializedName("task") - private TaskModel task; + private TaskModel task = new TaskModel(); @SerializedName("gift") - private GiftModel gift; + private GiftModel gift = new GiftModel(); @SerializedName("reward_all") - private RewardAllModel rewardAll; + private RewardAllModel rewardAll = new RewardAllModel(); @SerializedName("reward_one") - private RewardAllModel rewardOne; + private RewardAllModel rewardOne = new RewardAllModel(); public TaskModel getTask() { return task; diff --git a/common/src/main/java/com/yunbao/common/views/weight/NobleNoticeView.java b/common/src/main/java/com/yunbao/common/views/weight/NobleNoticeView.java index efdce665e..20eb8fa88 100644 --- a/common/src/main/java/com/yunbao/common/views/weight/NobleNoticeView.java +++ b/common/src/main/java/com/yunbao/common/views/weight/NobleNoticeView.java @@ -1,6 +1,5 @@ package com.yunbao.common.views.weight; -import android.animation.ValueAnimator; import android.content.Context; import android.graphics.Bitmap; import android.text.TextUtils; @@ -32,8 +31,6 @@ import com.yunbao.common.utils.SVGAViewUtils; import org.jetbrains.annotations.NotNull; -import java.lang.reflect.Field; - import io.reactivex.Observable; import io.reactivex.ObservableEmitter; import io.reactivex.ObservableOnSubscribe; diff --git a/config.gradle b/config.gradle index d73f7bbfa..9b9ac5933 100644 --- a/config.gradle +++ b/config.gradle @@ -10,9 +10,9 @@ ext { manifestPlaceholders = [ //正式 -// serverHost : "https://napi.yaoulive.com", + serverHost : "https://napi.yaoulive.com", //測試 - serverHost : "https://ceshi.yaoulive.com", +// serverHost : "https://ceshi.yaoulive.com", //腾讯地图 txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB", diff --git a/live/src/main/java/com/yunbao/live/activity/LiveActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveActivity.java index 9d1fa1241..82c1eb317 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveActivity.java @@ -25,6 +25,7 @@ import com.yunbao.common.activity.WebViewActivity; import com.yunbao.common.bean.ConfigBean; import com.yunbao.common.bean.LiveBean; import com.yunbao.common.bean.LiveGiftBean; +import com.yunbao.common.bean.LiveUserGiftBean; import com.yunbao.common.bean.NobleRankHideUserListModel; import com.yunbao.common.bean.UserBean; import com.yunbao.common.event.CoinChangeEvent; @@ -51,7 +52,6 @@ import com.yunbao.live.bean.LiveGuardInfo; import com.yunbao.live.bean.LiveLuckGiftWinBean; import com.yunbao.live.bean.LivePKUserListBean; import com.yunbao.live.bean.LiveReceiveGiftBean; -import com.yunbao.common.bean.LiveUserGiftBean; import com.yunbao.live.dialog.GiftPrizePoolFragment; import com.yunbao.live.dialog.LiveChatRoomDialogFragment; import com.yunbao.live.dialog.LiveFansFragment; @@ -374,15 +374,11 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL */ @Override public void onSendGiftPk(long leftGift, long rightGift, LivePKUserListBean bean) { -// if (isRy == false) { -// if (mLiveLinkMicPkPresenter != null) { -// mLiveLinkMicPkPresenter.onPkProgressChanged(leftGift, rightGift, bean); -// } -// } else { + if (mLiveRyLinkMicPkPresenter != null) { mLiveRyLinkMicPkPresenter.onPkProgressChanged(leftGift, rightGift, bean); } -// } + } /** @@ -1200,11 +1196,12 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL * 守护列表弹窗 */ public void openNewGuardListWindow(boolean showBuyView) { - openNewGuardListWindow(showBuyView,null); + openNewGuardListWindow(showBuyView, null); } - public void openNewGuardListWindow(boolean showBuyView,String uid) { - if(uid==null){ - uid=mLiveUid; + + public void openNewGuardListWindow(boolean showBuyView, String uid) { + if (uid == null) { + uid = mLiveUid; } LiveHttpUtil.getGuardList(uid, 1, new HttpCallback() { @Override @@ -1234,9 +1231,10 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL public void openFansWindow() { openFansWindow(null); } + public void openFansWindow(String uid) { - if(uid==null){ - uid=mLiveUid; + if (uid == null) { + uid = mLiveUid; } LiveFansFragment fragment = new LiveFansFragment(mContext); Bundle bundle = new Bundle(); 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 373162dc9..cfcbe1164 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -2749,7 +2749,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis * @param bean */ public void showBuyVipMessage(LiveReceiveGiftBean bean) { + noble.setVisibility(View.VISIBLE); switch (bean.getNobilityid()) { + case "1": noble.setRootView(bean.getUhead(), bean.getUname(), @@ -3167,46 +3169,49 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis if (taskModel != null) { GiftModel giftModel = newPeopleTask.getGift(); - RewardAllModel rewardOne = newPeopleTask.getRewardOne(); - String gold = rewardOne.getGold(); - String experience = rewardOne.getExperience(); - bean1 = new LiveGiftBean(); - bean1.setSwf(giftModel.getSwf()); - bean1.setChecked(false); - bean1.setIcon(giftModel.getGifticon()); - bean1.setId(Integer.parseInt(giftModel.getId())); - bean1.setName(giftModel.getGiftname()); - bean1.setTag("1"); + if (giftModel!=null){ + RewardAllModel rewardOne = newPeopleTask.getRewardOne(); + String gold = rewardOne.getGold(); + String experience = rewardOne.getExperience(); + bean1 = new LiveGiftBean(); + bean1.setSwf(giftModel.getSwf()); + bean1.setChecked(false); + bean1.setIcon(giftModel.getGifticon()); + bean1.setId(Integer.parseInt(giftModel.getId())); + bean1.setName(giftModel.getGiftname()); + bean1.setTag("1"); - if (!IMLoginManager.get(mContext).isisNewUserOne()) { - if (TextUtils.equals(taskModel.getSendgift(), "0")) { - IMLoginManager.get(mContext).setNewUserGif(true); - EventBus.getDefault().post("svga_new_user_gif"); + if (!IMLoginManager.get(mContext).isisNewUserOne()) { + if (TextUtils.equals(taskModel.getSendgift(), "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()); + mBannerList3.add(banner3Bean); + + + BannerBean banner3Bean1 = new BannerBean(); + banner3Bean1.setImageUrl("https://downs.yaoulive.com/live_Mission_box.png"); + banner3Bean1.setLink(taskModel.getAttent()); + mBannerList3.add(banner3Bean1); + + BannerBean banner3Bean2 = new BannerBean(); + banner3Bean2.setImageUrl("https://downs.yaoulive.com/live_Mission_box.png"); + banner3Bean2.setLink(taskModel.getIllumine()); + mBannerList3.add(banner3Bean2); + + if (TextUtils.equals(taskModel.getSendgift(), "0") && !IMLoginManager.get(mContext).isisNewUserOne()) { + showBanner3(bean1); + } else if (TextUtils.equals(taskModel.getAttent(), "0") && !IMLoginManager.get(mContext).isisNewUserOne()) { + showBanner3(bean1); + } else if (TextUtils.equals(taskModel.getIllumine(), "0") && !IMLoginManager.get(mContext).isisNewUserOne()) { + showBanner3(bean1); } } - BannerBean banner3Bean = new BannerBean(); - banner3Bean.setImageUrl("https://downs.yaoulive.com/live_Mission_box.png"); - banner3Bean.setLink(taskModel.getSendgift()); - mBannerList3.add(banner3Bean); - - BannerBean banner3Bean1 = new BannerBean(); - banner3Bean1.setImageUrl("https://downs.yaoulive.com/live_Mission_box.png"); - banner3Bean1.setLink(taskModel.getAttent()); - mBannerList3.add(banner3Bean1); - - BannerBean banner3Bean2 = new BannerBean(); - banner3Bean2.setImageUrl("https://downs.yaoulive.com/live_Mission_box.png"); - banner3Bean2.setLink(taskModel.getIllumine()); - mBannerList3.add(banner3Bean2); - - if (TextUtils.equals(taskModel.getSendgift(), "0") && !IMLoginManager.get(mContext).isisNewUserOne()) { - showBanner3(bean1); - } else if (TextUtils.equals(taskModel.getAttent(), "0") && !IMLoginManager.get(mContext).isisNewUserOne()) { - showBanner3(bean1); - } else if (TextUtils.equals(taskModel.getIllumine(), "0") && !IMLoginManager.get(mContext).isisNewUserOne()) { - showBanner3(bean1); - } } } @@ -3552,6 +3557,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis * 前往直播间 */ private void gotoLive(final String liveId) { + noble.setVisibility(View.GONE); LiveHttpUtil.getLiveInfo(liveId, new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) {