修复随机PK天梯赛不出现的问题

This commit is contained in:
zlzw 2022-12-14 16:45:43 +08:00
parent a5516ebfb3
commit 1407ecc2f2
4 changed files with 14 additions and 5 deletions

View File

@ -10,9 +10,9 @@ ext {
manifestPlaceholders = [ 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", txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB",

View File

@ -866,8 +866,8 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
LiveRyAnchorActivity.isDRPK = 1; LiveRyAnchorActivity.isDRPK = 1;
LivePushRyViewHolder.btn_close.setVisibility(View.VISIBLE); LivePushRyViewHolder.btn_close.setVisibility(View.VISIBLE);
SocketRyLinkMicPkUtil.linkMicPkAccept(mSocketRyClient, mApplyUid, mApplyUrl, mApplyNmae); SocketRyLinkMicPkUtil.linkMicPkAccept(mSocketRyClient, mApplyUid, mApplyUrl, mApplyNmae);
EventBus.getDefault().post(new LiveAudienceEvent().setType(LiveAudienceEvent.LiveAudienceType.UP_PK_TWO).setObject(mApplyUid));
onLinkMicPkStart(mApplyUid, 2); onLinkMicPkStart(mApplyUid, 2);
EventBus.getDefault().post(new LiveAudienceEvent().setType(LiveAudienceEvent.LiveAudienceType.UP_PK_TWO));
} }
}); });
} }

View File

@ -331,7 +331,7 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX
} }
mLiveRyLinkMicPkPresenter.onLinkMicToPk(userBean1); mLiveRyLinkMicPkPresenter.onLinkMicToPk(userBean1);
mLiveRyLinkMicPkPresenter.onLinkMicPkStart(inviteeRoomId, 3); mLiveRyLinkMicPkPresenter.onLinkMicPkStart(inviteeRoomId, 3);
EventBus.getDefault().post(new LiveAudienceEvent().setType(LiveAudienceEvent.LiveAudienceType.UP_PK_TWO)); EventBus.getDefault().post(new LiveAudienceEvent().setType(LiveAudienceEvent.LiveAudienceType.UP_PK_TWO).setObject(userBean1.getId()));
} }
} }
}); });

View File

@ -89,6 +89,7 @@ import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.interfaces.CommonCallback; import com.yunbao.common.interfaces.CommonCallback;
import com.yunbao.common.interfaces.OnItemClickListener; import com.yunbao.common.interfaces.OnItemClickListener;
import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.manager.RandomPkManager;
import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.DeviceUtils; import com.yunbao.common.utils.DeviceUtils;
import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.DialogUitl;
@ -99,6 +100,7 @@ import com.yunbao.common.utils.SVGAViewUtils;
import com.yunbao.common.utils.ScreenDimenUtil; import com.yunbao.common.utils.ScreenDimenUtil;
import com.yunbao.common.utils.SpUtil; import com.yunbao.common.utils.SpUtil;
import com.yunbao.common.utils.StringUtil; import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil; import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.utils.formatBigNum; import com.yunbao.common.utils.formatBigNum;
import com.yunbao.common.views.AbsViewHolder; import com.yunbao.common.views.AbsViewHolder;
@ -1971,6 +1973,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
uidR2 = ""; uidR2 = "";
uidR1 = ""; uidR1 = "";
uidR3 = ""; uidR3 = "";
if (RandomPkManager.getInstance().isRandomModel()) {
RandomPkManager.getInstance().setPkStatus(RandomPkManager.PK_STATUS_START);
}
new Handler(Looper.getMainLooper()).postDelayed(this::initPkRank, 300);
} }
//双人pk关闭 //双人pk关闭
@ -3823,6 +3830,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
endDRGif(); endDRGif();
break; break;
case UP_PK_TWO: case UP_PK_TWO:
pkUid = (String) event.getObject();
ToastUtil.show("对方UID=" + pkUid);
UpPkTwo(); UpPkTwo();
break; break;
} }