社区选择游戏改版完成

This commit is contained in:
kehaoyuan
2018-06-19 19:46:31 +08:00
parent 47482ba793
commit 76e91265d5
26 changed files with 395 additions and 206 deletions

View File

@ -6,7 +6,6 @@ import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.text.TextUtils;
import com.gh.common.util.GsonUtils;
import com.gh.gamecenter.BuildConfig;
import com.gh.gamecenter.entity.NewsEntity;
import com.gh.gamecenter.entity.SettingsEntity;
@ -50,8 +49,8 @@ public class Config {
private static SettingsEntity mSettingsEntity;
public static boolean isShow() {
// SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
// return sp.getBoolean("isShow", true);
if (PreferenceManager.getDefaultSharedPreferences(HaloApp.getInstance().getApplication())
.getBoolean("isFixDownload", false)) return true;
if (!isExistDownloadFilter()) return false;
@ -76,6 +75,9 @@ public class Config {
}
public static boolean isShowDownload(String gameId) {
if (PreferenceManager.getDefaultSharedPreferences(HaloApp.getInstance().getApplication())
.getBoolean("isFixDownload", false)) return true;
if (TextUtils.isEmpty(gameId) || !isExistDownloadFilter())
return false;
@ -146,10 +148,6 @@ public class Config {
}
public static void setSettings(SettingsEntity settingsEntity) {
if (settingsEntity != null && settingsEntity.getSuggestion() != null) {
String s = GsonUtils.Companion.getInstance().toJson(settingsEntity);
}
mSettingsEntity = settingsEntity;
}