Merge remote-tracking branch 'origin/新潘多拉_6.8.2' into 新潘多拉_6.8.2

This commit is contained in:
ningwenqiang 2024-09-27 16:53:55 +08:00
commit 57e25eaa89
2 changed files with 11 additions and 9 deletions

View File

@ -6551,7 +6551,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
mRoot.removeView(detailsView); mRoot.removeView(detailsView);
} }
L.eSw("upDataPkScore(JSONArray pkScores, int time) {detailsView=null"); L.eSw("upDataPkScore(JSONArray pkScores, int time) {detailsView=null");
detailsView = LayoutInflater.from(mContext).inflate(R.layout.view_live_pk_details, null); detailsView = LayoutInflater.from(mContext).inflate(R.layout.view_live_pk_details, mParentView, false);
timeTitle = detailsView.findViewById(R.id.time_title); timeTitle = detailsView.findViewById(R.id.time_title);
textTime = detailsView.findViewById(R.id.text_time); textTime = detailsView.findViewById(R.id.text_time);
linearGrade1 = detailsView.findViewById(R.id.lin_pk1); linearGrade1 = detailsView.findViewById(R.id.lin_pk1);
@ -6586,7 +6586,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) detailsView.getLayoutParams(); RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) detailsView.getLayoutParams();
params.height = vHeight; params.height = vHeight;
params.width = mScreenWdith; params.width = mScreenWdith;
params.topMargin = DpUtil.dp2px(128); params.topMargin = ((int) mContext.getResources().getDimension(R.dimen.live_top) - DpUtil.dp2px(15));
params.addRule(RelativeLayout.ALIGN_TOP); params.addRule(RelativeLayout.ALIGN_TOP);
detailsView.setLayoutParams(params); detailsView.setLayoutParams(params);
} }
@ -6721,7 +6721,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) detailsView.getLayoutParams(); RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) detailsView.getLayoutParams();
params.height = vHeight; params.height = vHeight;
params.width = mScreenWdith; params.width = mScreenWdith;
params.topMargin = DpUtil.dp2px(105); params.topMargin = ((int) mContext.getResources().getDimension(R.dimen.live_top) - DpUtil.dp2px(15));
params.addRule(RelativeLayout.ALIGN_TOP); params.addRule(RelativeLayout.ALIGN_TOP);
detailsView.setLayoutParams(params); detailsView.setLayoutParams(params);
} }

View File

@ -27,6 +27,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.blankj.utilcode.util.GsonUtils; import com.blankj.utilcode.util.GsonUtils;
import com.blankj.utilcode.util.LogUtils;
import com.lzf.easyfloat.EasyFloat; import com.lzf.easyfloat.EasyFloat;
import com.lzf.easyfloat.permission.PermissionUtils; import com.lzf.easyfloat.permission.PermissionUtils;
import com.lzf.easyfloat.utils.LifecycleUtils; import com.lzf.easyfloat.utils.LifecycleUtils;
@ -693,7 +694,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
//初始化天梯赛信息 //初始化天梯赛信息
mLiveRoomViewHolder.initRankPKInfo(String.valueOf(data.getLiveInfo().getUid()), pkUid); mLiveRoomViewHolder.initRankPKInfo(String.valueOf(data.getLiveInfo().getUid()), pkUid);
anyway = "1"; anyway = "1";
if (!TextUtils.isEmpty(pkUid) && !"0".equals(pkUid) && anyway.equals("0")) { if (!TextUtils.isEmpty(pkUid) && !"0".equals(pkUid) && "0".equals(anyway)) {
if (mLiveSDK != Constants.LIVE_SDK_TX) { if (mLiveSDK != Constants.LIVE_SDK_TX) {
String pkPull = pkInfo.getString("pkpull"); String pkPull = pkInfo.getString("pkpull");
if (!TextUtils.isEmpty(pkPull) && mLiveLinkMicAnchorPresenter != null) { if (!TextUtils.isEmpty(pkPull) && mLiveLinkMicAnchorPresenter != null) {
@ -760,7 +761,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
mLiveRyLinkMicPkPresenter.onEnterRoomPkStart(pkUid, pkInfo.getLongValue("pk_gift_liveuid"), pkInfo.getLongValue("pk_gift_pkuid"), pkInfo.getIntValue("pk_time"), livePKUserListBean); mLiveRyLinkMicPkPresenter.onEnterRoomPkStart(pkUid, pkInfo.getLongValue("pk_gift_liveuid"), pkInfo.getLongValue("pk_gift_pkuid"), pkInfo.getIntValue("pk_time"), livePKUserListBean);
} }
isShowPrank = false; isShowPrank = false;
} else if (!pkInfo.getString("end_pk_time").equals("0")) { } else if (!"0".equals(pkInfo.getString("end_pk_time"))) {
if (mLiveRoomViewHolder != null) { if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.pkHandler = true; mLiveRoomViewHolder.pkHandler = true;
mLiveRoomViewHolder.pkUid = pkUid; mLiveRoomViewHolder.pkUid = pkUid;
@ -907,19 +908,19 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
} }
//初始化整蠱列表 //初始化整蠱列表
mLiveRoomViewHolder.initPrankProgress(isShowPrank?1:2); mLiveRoomViewHolder.initPrankProgress(isShowPrank?1:2);
mLiveRoomViewHolder.setComAll(data.getEnterRoomInfo().getIsComAll().equals("1")); mLiveRoomViewHolder.setComAll("1".equals(data.getEnterRoomInfo().getIsComAll()));
L.e("getIsFirstEntry:"+data.getEnterRoomInfo().getIsFirstEntry()); L.e("getIsFirstEntry:"+data.getEnterRoomInfo().getIsFirstEntry());
L.e("getIsNewUser:"+data.getEnterRoomInfo().getIsNewUser()); L.e("getIsNewUser:"+data.getEnterRoomInfo().getIsNewUser());
L.e("getIsattention:"+data.getEnterRoomInfo().getIsattention()); L.e("getIsattention:"+data.getEnterRoomInfo().getIsattention());
if(data.getEnterRoomInfo().getIsNewUser().equals("1")){ if("1".equals(data.getEnterRoomInfo().getIsNewUser())){
//检测是否是首次观看该直播间 //检测是否是首次观看该直播间
if(data.getEnterRoomInfo().getIsFirstEntry().equals("1")){ if("1".equals(data.getEnterRoomInfo().getIsFirstEntry())){
mLiveRoomViewHolder.firstLookLiveNotify(); mLiveRoomViewHolder.firstLookLiveNotify();
} }
//判断是否有免费礼物 //判断是否有免费礼物
if(data.getNewPeopleTask().getTask().getSendgift().equals("0")){ if("0".equals(data.getNewPeopleTask().getTask().getSendgift())){
mLiveRoomViewHolder.firstLook5MinLiveNotify(); mLiveRoomViewHolder.firstLook5MinLiveNotify();
} }
//观看200秒之后推送活动入口im消息 //观看200秒之后推送活动入口im消息
@ -931,6 +932,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(WordUtil.isNewZh() ? "抱歉!出錯了!" : "i \\'m sorry! An error occurred"); ToastUtil.show(WordUtil.isNewZh() ? "抱歉!出錯了!" : "i \\'m sorry! An error occurred");
LogUtils.e(error);
//直播间上部轮播新人特惠趣味游戏幸运天使 轮播接口 //直播间上部轮播新人特惠趣味游戏幸运天使 轮播接口
mLiveRoomViewHolder.showLiveRoomActivityBanner(); mLiveRoomViewHolder.showLiveRoomActivityBanner();
} }