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