|
|
@ -352,23 +352,17 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void onMenuTheme(int id) {
|
|
|
|
private void onMenuTheme(int id) {
|
|
|
|
if (Helper.isPro(this)) {
|
|
|
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
|
|
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
|
|
|
switch (id) {
|
|
|
|
switch (id) {
|
|
|
|
case R.string.title_setup_light_theme:
|
|
|
|
case R.string.title_setup_light_theme:
|
|
|
|
prefs.edit().putString("theme", "light").apply();
|
|
|
|
prefs.edit().putString("theme", "light").apply();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case R.string.title_setup_dark_theme:
|
|
|
|
case R.string.title_setup_dark_theme:
|
|
|
|
prefs.edit().putString("theme", "dark").apply();
|
|
|
|
prefs.edit().putString("theme", "dark").apply();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case R.string.title_setup_black_theme:
|
|
|
|
case R.string.title_setup_black_theme:
|
|
|
|
prefs.edit().putString("theme", "black").apply();
|
|
|
|
prefs.edit().putString("theme", "black").apply();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
|
|
|
|
|
|
|
|
fragmentTransaction.replace(R.id.content_frame, new FragmentPro()).addToBackStack("pro");
|
|
|
|
|
|
|
|
fragmentTransaction.commit();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -639,7 +633,7 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
|
|
|
|
for (int s = 0; s < jsettings.length(); s++) {
|
|
|
|
for (int s = 0; s < jsettings.length(); s++) {
|
|
|
|
JSONObject jsetting = (JSONObject) jsettings.get(s);
|
|
|
|
JSONObject jsetting = (JSONObject) jsettings.get(s);
|
|
|
|
String key = jsetting.getString("key");
|
|
|
|
String key = jsetting.getString("key");
|
|
|
|
if (!"pro".equals(key) && !"theme".equals(key)) {
|
|
|
|
if (!"pro".equals(key)) {
|
|
|
|
Object value = jsetting.get("value");
|
|
|
|
Object value = jsetting.get("value");
|
|
|
|
if (value instanceof Boolean)
|
|
|
|
if (value instanceof Boolean)
|
|
|
|
editor.putBoolean(key, (Boolean) value);
|
|
|
|
editor.putBoolean(key, (Boolean) value);
|
|
|
|