优化新人任务的判断逻辑,贵族通知切换直播间的逻辑优化

This commit is contained in:
18401019693 2022-11-29 10:18:48 +08:00
parent af26dc24c7
commit 744de267dd
6 changed files with 69 additions and 67 deletions

View File

@ -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<ActiveModel> activeList;//活动列表
private List<ActiveModel> activeList = new ArrayList<>();//活动列表
@SerializedName("isUseHotCard")
private String isUseHotCard;//是否使用热度卡
private String isUseHotCard = "";//是否使用热度卡
@SerializedName("liveRoomActivity")
private List<LiveRoomActivityModel> liveRoomActivityModels;//活动列表
private List<LiveRoomActivityModel> liveRoomActivityModels = new ArrayList<>();//活动列表
public List<LiveRoomActivityModel> getLiveRoomActivityModels() {
return liveRoomActivityModels;

View File

@ -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;

View File

@ -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;

View File

@ -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",

View File

@ -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();

View File

@ -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,6 +3169,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
if (taskModel != null) {
GiftModel giftModel = newPeopleTask.getGift();
if (giftModel!=null){
RewardAllModel rewardOne = newPeopleTask.getRewardOne();
String gold = rewardOne.getGold();
String experience = rewardOne.getExperience();
@ -3211,6 +3214,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
}
}
/**
* 展示新人任务 Banner
*/
@ -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) {