update 随机PK 调整拒绝PK回报服务器的时机
This commit is contained in:
parent
c49c560e8d
commit
4a84283000
@ -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<String>() {
|
||||
@Override
|
||||
|
@ -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();
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user