From 4a842830007b18c33313d2537808a0beab0d00ab Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Fri, 9 Dec 2022 17:19:50 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E9=9A=8F=E6=9C=BAPK=20=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E6=8B=92=E7=BB=9DPK=E5=9B=9E=E6=8A=A5=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E5=99=A8=E7=9A=84=E6=97=B6=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/yunbao/common/manager/RandomPkManager.java | 4 ++-- .../com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/manager/RandomPkManager.java b/common/src/main/java/com/yunbao/common/manager/RandomPkManager.java index 653e05343..32fccb6c4 100644 --- a/common/src/main/java/com/yunbao/common/manager/RandomPkManager.java +++ b/common/src/main/java/com/yunbao/common/manager/RandomPkManager.java @@ -87,7 +87,6 @@ public class RandomPkManager { @Override public void run() { - status = PK_STATUS_REQUEST; sec++; if (sec % 60 == 0) { min++; @@ -114,9 +113,10 @@ public class RandomPkManager { * 对方拒绝,开始下一轮匹配 */ private void nextPk() { - if (status != PK_STATUS_REQUEST && status != PK_STATUS_REFUSE) { + if (status != PK_STATUS_DEFAULT && status != PK_STATUS_REFUSE) { return; } + status = PK_STATUS_REQUEST; LiveNetManager.get(CommonAppContext.getTopActivity()) .randomPK(new HttpCallback() { @Override 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 1f208a067..d117eedf5 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java @@ -1261,10 +1261,9 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { ((TextView) context).setText("隨機PK可打開時間:" + new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault()).format(new Date(System.currentTimeMillis() + 7200000)));//7200000ms=120m=2h ((TextView) context).setTextSize(12); ((TextView) context).setTextColor(Color.parseColor("#999999")); - + refusePk(u); cancelBtn.setVisibility(View.GONE); confirmBtn.setOnClickListener(v -> { - refusePk(u); dialog.dismiss(); }); }