From 1407ecc2f2cd58939da5475deea54c09b2dfe653 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Wed, 14 Dec 2022 16:45:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=9A=8F=E6=9C=BAPK=E5=A4=A9?= =?UTF-8?q?=E6=A2=AF=E8=B5=9B=E4=B8=8D=E5=87=BA=E7=8E=B0=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.gradle | 4 ++-- .../yunbao/live/presenter/LiveRyLinkMicPkPresenter.java | 4 ++-- .../java/com/yunbao/live/views/LivePushRyViewHolder.java | 2 +- .../java/com/yunbao/live/views/LiveRoomViewHolder.java | 9 +++++++++ 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/config.gradle b/config.gradle index f139351ac..920428bb0 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/presenter/LiveRyLinkMicPkPresenter.java b/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java index ae81dcdd1..a79ba318b 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java @@ -866,8 +866,8 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { LiveRyAnchorActivity.isDRPK = 1; LivePushRyViewHolder.btn_close.setVisibility(View.VISIBLE); SocketRyLinkMicPkUtil.linkMicPkAccept(mSocketRyClient, mApplyUid, mApplyUrl, mApplyNmae); + EventBus.getDefault().post(new LiveAudienceEvent().setType(LiveAudienceEvent.LiveAudienceType.UP_PK_TWO).setObject(mApplyUid)); onLinkMicPkStart(mApplyUid, 2); - EventBus.getDefault().post(new LiveAudienceEvent().setType(LiveAudienceEvent.LiveAudienceType.UP_PK_TWO)); } }); } @@ -1408,7 +1408,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { ToastUtil.show("接受失败"); } }); - }else { + } else { ToastUtil.show(msg); } } diff --git a/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java b/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java index bb1e810f5..1caa73c35 100644 --- a/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java @@ -331,7 +331,7 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX } mLiveRyLinkMicPkPresenter.onLinkMicToPk(userBean1); 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())); } } }); 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 56003c782..ce63a5791 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -89,6 +89,7 @@ import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.interfaces.CommonCallback; import com.yunbao.common.interfaces.OnItemClickListener; import com.yunbao.common.manager.IMLoginManager; +import com.yunbao.common.manager.RandomPkManager; import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.DeviceUtils; 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.SpUtil; import com.yunbao.common.utils.StringUtil; +import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.WordUtil; import com.yunbao.common.utils.formatBigNum; import com.yunbao.common.views.AbsViewHolder; @@ -1971,6 +1973,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis uidR2 = ""; uidR1 = ""; uidR3 = ""; + + if (RandomPkManager.getInstance().isRandomModel()) { + RandomPkManager.getInstance().setPkStatus(RandomPkManager.PK_STATUS_START); + } + new Handler(Looper.getMainLooper()).postDelayed(this::initPkRank, 300); } //双人pk关闭 @@ -3823,6 +3830,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis endDRGif(); break; case UP_PK_TWO: + pkUid = (String) event.getObject(); + ToastUtil.show("对方UID=" + pkUid); UpPkTwo(); break; }