1:修改交友房出现嘉宾会闭麦的情况

This commit is contained in:
2025-11-03 10:08:58 +08:00
parent f4f04b59a8
commit f5377127ce
21 changed files with 459 additions and 524 deletions

View File

@@ -4,6 +4,8 @@ import static com.blankj.utilcode.util.ActivityUtils.startActivity;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Handler;
import android.sax.ElementListener;
import android.view.View;
import androidx.appcompat.app.AlertDialog;
@@ -28,13 +30,24 @@ import com.xscm.moduleutil.utils.config.ConfigManager;
import com.xscm.moduleutil.utils.config.EnvironmentEnum;
import com.xscm.moduleutil.utils.config.EnvironmentPrefs;
import com.xscm.moduleutil.widget.CommonAppConfig;
/**
*@author qx
*@data 2025/8/14
*@description: 设置
* @author qx
* @data 2025/8/14
* @description: 设置
*/
public class SettingActivity extends BaseMvpActivity<SettingPresenter, ActivitySettingBinding> implements SettingConacts.View {
private int clickCount = 0;
private static final int REQUIRED_CLICKS = 6;
private Handler handler = new Handler();
private Runnable resetRunnable = new Runnable() {
@Override
public void run() {
clickCount = 0; // 自动重置计数器
}
};
private static final long RESET_DELAY = 1000; // 1秒无操作自动重置
protected void initData() {
mBinding.tvBbh.setText(CommonAppConfig.getInstance().getVersion());
@@ -60,6 +73,7 @@ public class SettingActivity extends BaseMvpActivity<SettingPresenter, ActivityS
mBinding.llTcdl.setOnClickListener(this::onClick);
mBinding.llZhxiao.setOnClickListener(this::onClick);
mBinding.llGywm.setOnClickListener(this::onClick);
mBinding.llBbh.setOnClickListener(this::onClick);
}
private void onClick(View view) {
@@ -127,7 +141,7 @@ public class SettingActivity extends BaseMvpActivity<SettingPresenter, ActivityS
.setPositiveButton("确定", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (MvpPre == null){
if (MvpPre == null) {
MvpPre = bindPresenter();
}
@@ -142,28 +156,44 @@ public class SettingActivity extends BaseMvpActivity<SettingPresenter, ActivityS
}
})
.setNegativeButton("取消", null).create().show();
}else if (view.getId() == R.id.ll_zhxiao){
} else if (view.getId() == R.id.ll_zhxiao) {
new AlertDialog.Builder(this).setMessage("确定要注销账号吗?")
.setMessage("注销后您当前的账户金币及钻石将无法找回,\n 30天内本账号将无法登陆请谨慎操作")
.setPositiveButton("确定", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (MvpPre==null){
MvpPre=bindPresenter();
if (MvpPre == null) {
MvpPre = bindPresenter();
}
MvpPre.cancel();
}
})
.setNegativeButton("取消", null).create().show();
}else if (view.getId() == R.id.ll_gywm){
} else if (view.getId() == R.id.ll_gywm) {
// Intent intent = new Intent(this, WebViewActivity.class);
// intent.putExtra("url", "https://vespa.qxmier.com/web/index.html#/pages/other/aboutUs?id=" + SpUtil.getToken());
// startActivity(intent);
startActivity(new Intent(this, AboutUsActivity.class));
} else if (view.getId() == R.id.ll_bbh) {
if (SpUtil.getShelf()==1) {
// 移除之前的重置任务
handler.removeCallbacks(resetRunnable);
clickCount++;
if (clickCount >= REQUIRED_CLICKS) {
// 写入内存值
SpUtil.setShelf(0);
clickCount = 0;
ToastUtils.showShort("已经打开趣味玩法");
} else {
// 延迟重置计数器
handler.postDelayed(resetRunnable, RESET_DELAY);
}
}
}
}
private void showYouthModelDialog() {
YouthModelDialog youthModelDialog = new YouthModelDialog(this, null);
youthModelDialog.show();
@@ -177,6 +207,7 @@ public class SettingActivity extends BaseMvpActivity<SettingPresenter, ActivityS
}
});
}
@Override
protected int getLayoutId() {
return R.layout.activity_setting;