~singpolyma/cheogram-android

cc38d2a2e6d785c10f0e72ccb49c47c2ab2b3629 — Stephen Paul Weber 29 days ago d78bc96
Fix NPE
1 files changed, 3 insertions(+), 3 deletions(-)

M src/main/java/eu/siacs/conversations/ui/SettingsActivity.java
M src/main/java/eu/siacs/conversations/ui/SettingsActivity.java => src/main/java/eu/siacs/conversations/ui/SettingsActivity.java +3 -3
@@ 435,15 435,15 @@ public class SettingsActivity extends XmppActivity implements OnSharedPreference
            final Preference customThemeIsDark = mSettingsFragment.findPreference("custom_theme_dark");

            if (customAutomatic) {
                customTheme.removePreference(customThemeIsDark);
                if (customTheme != null && customThemeIsDark != null) customTheme.removePreference(customThemeIsDark);
            } else {
                final boolean isDark = PreferenceManager.getDefaultSharedPreferences(this).getBoolean("custom_theme_dark", false);
                if (isDark) {
                    final PreferenceCategory customThemeColors = (PreferenceCategory) mSettingsFragment.findPreference("custom_theme_colors");
                    customTheme.removePreference(customThemeColors);
                    if (customTheme != null && customThemeColors != null) customTheme.removePreference(customThemeColors);
                } else {
                    final PreferenceCategory customThemeColorsDark = (PreferenceCategory) mSettingsFragment.findPreference("custom_theme_colors_dark");
                    customTheme.removePreference(customThemeColorsDark);
                    if (customTheme != null && customThemeColorsDark != null) customTheme.removePreference(customThemeColorsDark);
                }
            }
        }