update 随机PK

This commit is contained in:
zlzw 2022-12-08 18:14:13 +08:00
parent 3fa259c5b9
commit 4ad75a11a8

View File

@ -137,7 +137,7 @@ public class RandomPkDialogFragment extends AbsDialogFragment implements View.On
mPkBtnDesc.setText(R.string.random_pk_info_btn_end_desc); mPkBtnDesc.setText(R.string.random_pk_info_btn_end_desc);
mPkBtnDesc.setVisibility(View.VISIBLE); mPkBtnDesc.setVisibility(View.VISIBLE);
mPkBtn.setBackgroundResource(R.drawable.bg_live_room_random_pk_timer); mPkBtn.setBackgroundResource(R.drawable.bg_live_room_random_pk_timer);
}else if(RandomPkManager.getInstance().isExiting()){ } else if (RandomPkManager.getInstance().isExiting()) {
mPkBtnTitle.setText(String.format(WordUtil.getString(R.string.random_pk_info_btn_end), RandomPkManager.getInstance().getExitTimer())); mPkBtnTitle.setText(String.format(WordUtil.getString(R.string.random_pk_info_btn_end), RandomPkManager.getInstance().getExitTimer()));
mPkBtnDesc.setText(R.string.random_pk_info_btn_end_desc); mPkBtnDesc.setText(R.string.random_pk_info_btn_end_desc);
mPkBtn.setEnabled(false); mPkBtn.setEnabled(false);
@ -188,6 +188,9 @@ public class RandomPkDialogFragment extends AbsDialogFragment implements View.On
* @param pk 1=on,0=off * @param pk 1=on,0=off
*/ */
private void setPkSwitch(int pk) { private void setPkSwitch(int pk) {
if (RandomPkManager.getInstance().isRequestPk() || RandomPkManager.getInstance().isExiting()) {
return;
}
loadDialog = DialogUitl.loadingDialog(mContext); loadDialog = DialogUitl.loadingDialog(mContext);
loadDialog.show(); loadDialog.show();
LiveNetManager.get(mContext) LiveNetManager.get(mContext)