From 266435a2c422289200c24f13fe2e3990b45ab6c9 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 5 Nov 2018 22:35:05 +0100 Subject: [PATCH] #690 - use constant instead of string for settings key: reloaded --- .../java/de/luhmer/owncloudnewsreader/SettingsActivity.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/SettingsActivity.java b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/SettingsActivity.java index c7abe260..3f9dbe62 100644 --- a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/SettingsActivity.java +++ b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/SettingsActivity.java @@ -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 {