From 3f5a94e710b61301b4908282a2d9fd4fa672d6c2 Mon Sep 17 00:00:00 2001 From: huangzhuanghua <401742778@qq.com> Date: Mon, 14 Nov 2016 14:08:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=8E=E5=8F=B0=E6=88=96?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=89=93=E5=BC=80=E4=B8=8B=E8=BD=BD=E5=90=8E?= =?UTF-8?q?=E4=B8=8D=E4=BC=9A=E5=86=8D=E5=9B=9E=E5=88=B0=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E7=9A=84=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/com/gh/gamecenter/SettingActivity.java | 5 ++++- .../java/com/gh/gamecenter/SplashScreenActivity.java | 9 +++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/gh/gamecenter/SettingActivity.java b/app/src/main/java/com/gh/gamecenter/SettingActivity.java index a08382a997..b155c522e8 100644 --- a/app/src/main/java/com/gh/gamecenter/SettingActivity.java +++ b/app/src/main/java/com/gh/gamecenter/SettingActivity.java @@ -221,7 +221,10 @@ public class SettingActivity extends BaseActivity implements OnClickListener { finish(); break; case R.id.setting_cv_fix_download: - sp.edit().putBoolean("isShow", true).apply(); + Editor editor = sp.edit(); + editor.putBoolean("isShow", true); + editor.putBoolean("isCheckShow", false); + editor.apply(); toast("修复成功,快去首页看看吧"); EventBus.getDefault().post(new EBReuse("Refresh")); break; diff --git a/app/src/main/java/com/gh/gamecenter/SplashScreenActivity.java b/app/src/main/java/com/gh/gamecenter/SplashScreenActivity.java index 6b05422697..b540a443d1 100644 --- a/app/src/main/java/com/gh/gamecenter/SplashScreenActivity.java +++ b/app/src/main/java/com/gh/gamecenter/SplashScreenActivity.java @@ -220,7 +220,9 @@ public class SplashScreenActivity extends BaseActivity { } // 获取下载按钮状态、开启or关闭 - getDownloadStatus(); + if (sp.getBoolean("isCheckShow", true)) { + getDownloadStatus(); + } getUISetting(); @@ -330,7 +332,10 @@ public class SplashScreenActivity extends BaseActivity { try { String status = response.getString("status"); if ("on".equals(status)) { - sp.edit().putBoolean("isShow", true).apply(); + Editor editor = sp.edit(); + editor.putBoolean("isShow", true); + editor.putBoolean("isCheckShow", false); + editor.apply(); } else { sp.edit().putBoolean("isShow", false).apply(); }