#690 - use constant instead of string for settings key: reloaded

This commit is contained in:
Daniel 2018-11-05 22:35:05 +01:00
parent c99041b14a
commit 266435a2c4

View file

@ -327,11 +327,11 @@ public class SettingsActivity extends AppCompatPreferenceActivity {
preference.setSummary(index >= 0 ? listPreference.getEntries()[index] : null);
// only enable black-bg setting if light or auto theme is selected
if(preference.getKey().equals(SP_APP_THEME)) {
if(SP_APP_THEME.equals(preference.getKey())) {
if (value.equals("1")) // value "1" means Light theme
preference.getPreferenceManager().findPreference("cb_oled_mode").setEnabled(false);
preference.getPreferenceManager().findPreference(CB_OLED_MODE).setEnabled(false);
else
preference.getPreferenceManager().findPreference("cb_oled_mode").setEnabled(true);
preference.getPreferenceManager().findPreference(CB_OLED_MODE).setEnabled(true);
}
} else {