Made dark/black theme free

pull/147/head
M66B 6 years ago
parent 39a4899c23
commit 2f7de17ac9

@ -34,7 +34,6 @@ This app starts a foreground service with a low priority status bar notification
## Pro features ## Pro features
* Signatures * Signatures
* Dark/black theme
* Account/identity colors * Account/identity colors
* Notifications per account * Notifications per account
* Notifications with message preview (requires Android 7 Nougat or later) * Notifications with message preview (requires Android 7 Nougat or later)

@ -48,13 +48,11 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
== PackageManager.PERMISSION_GRANTED); == PackageManager.PERMISSION_GRANTED);
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
if (Helper.isPro(this)) {
String theme = prefs.getString("theme", null); String theme = prefs.getString("theme", null);
if ("dark".equals(theme)) if ("dark".equals(theme))
setTheme(R.style.AppThemeDark); setTheme(R.style.AppThemeDark);
else if ("black".equals(theme)) else if ("black".equals(theme))
setTheme(R.style.AppThemeBlack); setTheme(R.style.AppThemeBlack);
}
prefs.registerOnSharedPreferenceChangeListener(this); prefs.registerOnSharedPreferenceChangeListener(this);

@ -352,7 +352,6 @@ 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:
@ -365,11 +364,6 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
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();
}
} }
private void onMenuOptions() { private void onMenuOptions() {
@ -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);

Loading…
Cancel
Save