同步PD修复内容:

FIX[修复BUG]
This commit is contained in:
zlzw 2024-06-18 19:24:23 +08:00
parent 08804a45d6
commit 65b045ca61
7 changed files with 37 additions and 29 deletions

View File

@ -379,7 +379,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
@Override @Override
public void OpenAndCloseListener() { public void OpenAndCloseListener() {
if(mLiveRoomViewHolder!=null){ if(mLiveRoomViewHolder!=null){
mLiveRoomViewHolder.initPrankProgress(); mLiveRoomViewHolder.initPrankProgress(1);
} }
} }
}); });
@ -881,7 +881,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
MicUserManager.get().removeAllMicUserList(); MicUserManager.get().removeAllMicUserList();
//加载整蛊 //加载整蛊
if(mLiveRoomViewHolder!=null){ if(mLiveRoomViewHolder!=null){
mLiveRoomViewHolder.initPrankProgress(); mLiveRoomViewHolder.initPrankProgress(2);
mLiveRoomViewHolder.sendMsgPrank(); mLiveRoomViewHolder.sendMsgPrank();
} }
} }

View File

@ -245,7 +245,6 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
mContainerWrap = (ViewGroup) findViewById(R.id.container_wrap); mContainerWrap = (ViewGroup) findViewById(R.id.container_wrap);
mContainer = (ViewGroup) findViewById(R.id.container); mContainer = (ViewGroup) findViewById(R.id.container);
mLiveSwLinkMicPkPresenter = new LiveSwLinkMicPkPresenter(mContext, mLivePushViewHolder, true, mContainer); mLiveSwLinkMicPkPresenter = new LiveSwLinkMicPkPresenter(mContext, mLivePushViewHolder, true, mContainer);
RandomPkManager.getInstance().addOnRandomPkTimer(onRandomPkTimer); RandomPkManager.getInstance().addOnRandomPkTimer(onRandomPkTimer);
manager.setOnMirrorChanged(new FaceManager.OnMirrorChanged() { manager.setOnMirrorChanged(new FaceManager.OnMirrorChanged() {
@ -369,7 +368,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
@Override @Override
public void OpenAndCloseListener() { public void OpenAndCloseListener() {
if(mLiveRoomViewHolder!=null){ if(mLiveRoomViewHolder!=null){
mLiveRoomViewHolder.initPrankProgress(); mLiveRoomViewHolder.initPrankProgress(1);
} }
} }
}); });
@ -876,7 +875,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
MicUserManager.get().removeAllMicUserList(); MicUserManager.get().removeAllMicUserList();
//加载整蛊 //加载整蛊
if(mLiveRoomViewHolder!=null){ if(mLiveRoomViewHolder!=null){
mLiveRoomViewHolder.initPrankProgress(); mLiveRoomViewHolder.initPrankProgress(2);
mLiveRoomViewHolder.sendMsgPrank(); mLiveRoomViewHolder.sendMsgPrank();
} }
mLiveSwLinkMicPkPresenter.setmLiveRoomViewHolder(mLiveRoomViewHolder); mLiveSwLinkMicPkPresenter.setmLiveRoomViewHolder(mLiveRoomViewHolder);

View File

@ -42,7 +42,7 @@ public class LivePrankAddGiftDialog extends AbsDialogPopupWindow {
@Override @Override
public void buildDialog(XPopup.Builder builder) { public void buildDialog(XPopup.Builder builder) {
builder.autoFocusEditText(false);
} }
public LivePrankAddGiftDialog setGiftBeans(List<PrankGiftBean> giftBeans,boolean isShow) { public LivePrankAddGiftDialog setGiftBeans(List<PrankGiftBean> giftBeans,boolean isShow) {

View File

@ -689,8 +689,10 @@ public class LiveSwLinkMicPkPresenter extends AbsLinkMicPkPresenter implements V
onLinkMicPkStart(mApplyUid, 2); onLinkMicPkStart(mApplyUid, 2);
} }
}); });
//收起整蠱列表 //收起整蛊列表
mLiveRoomViewHolder.closePrankView(); if(mLiveRoomViewHolder!=null){
mLiveRoomViewHolder.closePrankView();
}
} }
@Override @Override
@ -1523,6 +1525,10 @@ public class LiveSwLinkMicPkPresenter extends AbsLinkMicPkPresenter implements V
mPkTimeCount = PK_TIME_MAX; mPkTimeCount = PK_TIME_MAX;
} }
Log.d("mPkTimeCount2", "" + mPkTimeCount + ";mPkTimeFromServer=" + mPkTimeFromServer); Log.d("mPkTimeCount2", "" + mPkTimeCount + ";mPkTimeFromServer=" + mPkTimeFromServer);
//收起整蛊列表
if(mLiveRoomViewHolder!=null){
mLiveRoomViewHolder.closePrankView();
}
} }

View File

@ -1397,7 +1397,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
fragment.setOnPrankResultListener(new LivePrankDialogFragment.onPrankResultListener() { fragment.setOnPrankResultListener(new LivePrankDialogFragment.onPrankResultListener() {
@Override @Override
public void OpenAndCloseListener() { public void OpenAndCloseListener() {
initPrankProgress(); initPrankProgress(1);
} }
}); });
fragment.setmLiveUid(mLiveUid); fragment.setmLiveUid(mLiveUid);
@ -1644,7 +1644,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
reloadIM(); reloadIM();
// initStarChallengeStatus(); // initStarChallengeStatus();
new LoadDian9TuUtil().loadDian9TuAssets2(mContext, wishListLayout2, "rectangle_new.png", 1); new LoadDian9TuUtil().loadDian9TuAssets2(mContext, wishListLayout2, "rectangle_new.png", 1);
pa_pao_layout = (FrameLayout) findViewById(R.id.pa_pao_layout); pa_pao_layout = (FrameLayout) findViewById(R.id.pa_pao_layout);
combo_layout = (LinearLayout) findViewById(R.id.combo_layout); combo_layout = (LinearLayout) findViewById(R.id.combo_layout);
@ -1789,7 +1788,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
//初始化整蛊列表进度 //初始化整蛊列表进度
public void initPrankProgress(){ public void initPrankProgress(int isShow){
// LogUtils.e("yqw=====>主播id:"+mLiveUid); // LogUtils.e("yqw=====>主播id:"+mLiveUid);
//获取整蛊列表 //获取整蛊列表
LiveNetManager.get(mContext).getPrankProgressList(mLiveUid, new com.yunbao.common.http.base.HttpCallback<PrankProgressBean>() { LiveNetManager.get(mContext).getPrankProgressList(mLiveUid, new com.yunbao.common.http.base.HttpCallback<PrankProgressBean>() {
@ -1802,7 +1801,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
prankAndComboList.addAll(data.getPrank_list()); prankAndComboList.addAll(data.getPrank_list());
completedList.clear(); completedList.clear();
completedList.addAll(data.getCompleted_list()); completedList.addAll(data.getCompleted_list());
setPrankList(true,data.getStatus(),data.getPrank_type(),data.getPrank_turntable_status()); setPrankList(isShow,data.getStatus(),data.getPrank_type(),data.getPrank_turntable_status());
} }
@Override @Override
@ -1824,7 +1823,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
//列表全部更新 //列表全部更新
if (ctString.getInt("status")==1){ if (ctString.getInt("status")==1){
//编辑添加整蛊 //编辑添加整蛊
initPrankProgress(); initPrankProgress(1);
}else { }else {
//编辑取消整蛊 //编辑取消整蛊
prank_group.setVisibility(View.GONE); prank_group.setVisibility(View.GONE);
@ -1852,7 +1851,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
completedList.clear(); completedList.clear();
completedList.addAll(completeds); completedList.addAll(completeds);
setPrankList(false,Integer.parseInt(ctString.getString("status")), Integer.parseInt(ctString.getString("prank_type")), Integer.parseInt(ctString.getString("prank_turntable_status"))); setPrankList(0,Integer.parseInt(ctString.getString("status")), Integer.parseInt(ctString.getString("prank_type")), Integer.parseInt(ctString.getString("prank_turntable_status")));
} }
}catch (Exception e){ }catch (Exception e){
LogUtils.e("yqw=====>转换错误:"+e.getMessage()); LogUtils.e("yqw=====>转换错误:"+e.getMessage());
@ -1890,7 +1889,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
} }
//设置整蛊礼物数据 //设置整蛊礼物数据
private void setPrankList(boolean isShow,int status,int mPrankType,int prankTurntableStatus){ private void setPrankList(int isShow,int status,int mPrankType,int prankTurntableStatus){
this.mPrankType =mPrankType; this.mPrankType =mPrankType;
// LogUtils.e("yqw=====>显示转盘icon:是否显示:"+(prankTurntableStatus == 1)+",是否在倒计时"+(lt_trickery.getVisibility() == View.VISIBLE)); // LogUtils.e("yqw=====>显示转盘icon:是否显示:"+(prankTurntableStatus == 1)+",是否在倒计时"+(lt_trickery.getVisibility() == View.VISIBLE));
if (prankTurntableStatus == 1 && lt_trickery.getVisibility() == View.GONE){ if (prankTurntableStatus == 1 && lt_trickery.getVisibility() == View.GONE){
@ -1902,8 +1901,12 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
} }
// LogUtils.e("yqw=====>显示整蛊列表或者投票列表:"+status); // LogUtils.e("yqw=====>显示整蛊列表或者投票列表:"+status);
if (status == 1){ if (status == 1){
if(isShow){ if(isShow==1){
prank_group.setVisibility(View.VISIBLE); prank_group.setVisibility(View.VISIBLE);
prank_small_icon.setVisibility(View.GONE);
}else if(isShow==2){
prank_group.setVisibility(View.GONE);
prank_small_icon.setVisibility(View.VISIBLE);
} }
//主播可能打开整蛊功能但是不设置整蛊礼物这里会是空列表 //主播可能打开整蛊功能但是不设置整蛊礼物这里会是空列表
if (!prankAndComboList.isEmpty()){ if (!prankAndComboList.isEmpty()){

View File

@ -230,6 +230,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
private static int waitShowTopBannerTime = 6000; private static int waitShowTopBannerTime = 6000;
private boolean isSw; private boolean isSw;
private boolean isShowPrank = true;
public PortraitLiveManager setQuitF(boolean quitF) { public PortraitLiveManager setQuitF(boolean quitF) {
isQuitF = quitF; isQuitF = quitF;
@ -405,8 +406,10 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
mLiveLinkMicAnchorPresenter = new LiveLinkMicAnchorPresenter(mContext, mLivePlayViewHolder, false, mLiveSDK, null); mLiveLinkMicAnchorPresenter = new LiveLinkMicAnchorPresenter(mContext, mLivePlayViewHolder, false, mLiveSDK, null);
if (isSw) { if (isSw) {
mLiveSwLinkMicPkPresenter = new LiveSwLinkMicPkPresenter(mContext, mLivePlayViewHolder, false, null); mLiveSwLinkMicPkPresenter = new LiveSwLinkMicPkPresenter(mContext, mLivePlayViewHolder, false, null);
mLiveSwLinkMicPkPresenter.setmLiveRoomViewHolder(mLiveRoomViewHolder);
} else { } else {
mLiveRyLinkMicPkPresenter = new LiveRyLinkMicPkPresenter(mContext, mLivePlayViewHolder, false, null); mLiveRyLinkMicPkPresenter = new LiveRyLinkMicPkPresenter(mContext, mLivePlayViewHolder, false, null);
mLiveRyLinkMicPkPresenter.setmLiveRoomViewHolder(mLiveRoomViewHolder);
} }
mLivePlayViewHolder.initSwEngine(mLiveBean.getUid()); mLivePlayViewHolder.initSwEngine(mLiveBean.getUid());
mLivePlayViewHolder.addToParent(); mLivePlayViewHolder.addToParent();
@ -431,10 +434,12 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
if (isSw) { if (isSw) {
if (mLiveSwLinkMicPkPresenter == null) { if (mLiveSwLinkMicPkPresenter == null) {
mLiveSwLinkMicPkPresenter = new LiveSwLinkMicPkPresenter(mContext, mLivePlayViewHolder, false, null); mLiveSwLinkMicPkPresenter = new LiveSwLinkMicPkPresenter(mContext, mLivePlayViewHolder, false, null);
mLiveSwLinkMicPkPresenter.setmLiveRoomViewHolder(mLiveRoomViewHolder);
} }
} else { } else {
if (mLiveRyLinkMicPkPresenter == null) { if (mLiveRyLinkMicPkPresenter == null) {
mLiveRyLinkMicPkPresenter = new LiveRyLinkMicPkPresenter(mContext, mLivePlayViewHolder, false, null); mLiveRyLinkMicPkPresenter = new LiveRyLinkMicPkPresenter(mContext, mLivePlayViewHolder, false, null);
mLiveRyLinkMicPkPresenter.setmLiveRoomViewHolder(mLiveRoomViewHolder);
} }
} }
@ -637,9 +642,6 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
mLiveRoomViewHolder.setVoteData(data.getEnterRoomInfo().getVoteModel()); mLiveRoomViewHolder.setVoteData(data.getEnterRoomInfo().getVoteModel());
mLiveRoomViewHolder.updateFansMessageRed(); mLiveRoomViewHolder.updateFansMessageRed();
mLiveRoomViewHolder.setFansGroup(data.getEnterRoomInfo().getIsFans()); mLiveRoomViewHolder.setFansGroup(data.getEnterRoomInfo().getIsFans());
//初始化整蛊进度列表
mLiveRoomViewHolder.initPrankProgress();
isattention = Integer.parseInt(data.getEnterRoomInfo().getIsattention()); isattention = Integer.parseInt(data.getEnterRoomInfo().getIsattention());
if (isattention == 0) { if (isattention == 0) {
@ -726,8 +728,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
mLivePlayViewHolder.setPkView(connection_info.getPkuid()); mLivePlayViewHolder.setPkView(connection_info.getPkuid());
} }
} }
//收起整蠱列表 isShowPrank = false;
mLiveRoomViewHolder.closePrankView();
} }
if (mLiveRoomViewHolder != null) { if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.pkHandler = false; mLiveRoomViewHolder.pkHandler = false;
@ -755,6 +756,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
} else { } else {
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;
} else if (!pkInfo.getString("end_pk_time").equals("0")) { } else if (!pkInfo.getString("end_pk_time").equals("0")) {
if (mLiveRoomViewHolder != null) { if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.pkHandler = true; mLiveRoomViewHolder.pkHandler = true;
@ -773,13 +775,12 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
} else { } else {
mLiveRyLinkMicPkPresenter.onEnterRoomCFStart(pkUid, pkInfo.getLongValue("pk_gift_liveuid"), pkInfo.getLongValue("pk_gift_pkuid"), pkInfo.getIntValue("end_pk_time"), livePKUserListBean); mLiveRyLinkMicPkPresenter.onEnterRoomCFStart(pkUid, pkInfo.getLongValue("pk_gift_liveuid"), pkInfo.getLongValue("pk_gift_pkuid"), pkInfo.getIntValue("end_pk_time"), livePKUserListBean);
} }
isShowPrank = false;
} else { } else {
if (mLiveRoomViewHolder != null) { if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.initPkRank(null); mLiveRoomViewHolder.initPkRank(null);
} }
} }
//收起整蠱列表
mLiveRoomViewHolder.closePrankView();
//多人PK //多人PK
} else if (pkInfo != null && pkInfo.getIntValue("drpk_status") == 1) { } else if (pkInfo != null && pkInfo.getIntValue("drpk_status") == 1) {
if (mLiveRoomViewHolder != null) { if (mLiveRoomViewHolder != null) {
@ -812,8 +813,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
} }
upDataPkScore(pkInfo.getJSONArray("userlist"), pkInfo.getIntValue("drpk_time")); upDataPkScore(pkInfo.getJSONArray("userlist"), pkInfo.getIntValue("drpk_time"));
//收起整蠱列表 isShowPrank = false;
mLiveRoomViewHolder.closePrankView();
} }
if (data.getEnterRoomInfo().getGuard() != null) { if (data.getEnterRoomInfo().getGuard() != null) {
if (mLiveRoomViewHolder != null) { if (mLiveRoomViewHolder != null) {
@ -899,7 +899,8 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
if (!TextUtils.isEmpty(data.getModel().getSendMoneyLongKey())) { if (!TextUtils.isEmpty(data.getModel().getSendMoneyLongKey())) {
mLiveRoomViewHolder.onSendMoneyLong(); mLiveRoomViewHolder.onSendMoneyLong();
} }
//初始化整蠱列表
mLiveRoomViewHolder.initPrankProgress(isShowPrank?1:2);
} }
@Override @Override

View File

@ -2417,13 +2417,12 @@
android:layout_width="52dp" android:layout_width="52dp"
android:layout_height="76dp" android:layout_height="76dp"
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
tools:visibility="visible"
android:layout_gravity="end" android:layout_gravity="end"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:visibility="gone" android:visibility="gone"
app:delay_time="5000" app:delay_time="5000"
app:indicator_height="8dp" tools:visibility="visible"
app:indicator_width="8dp" /> app:indicator_height="8dp" />
<LinearLayout <LinearLayout
android:id="@+id/lt_trickery" android:id="@+id/lt_trickery"