diff options
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/SettingsActivity.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/SettingsActivity.java b/src/main/java/de/pixart/messenger/ui/SettingsActivity.java index ba7508556..93b95c9c1 100644 --- a/src/main/java/de/pixart/messenger/ui/SettingsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/SettingsActivity.java @@ -298,9 +298,18 @@ public class SettingsActivity extends XmppActivity implements final Preference useBundledEmojis = mSettingsFragment.findPreference("use_bundled_emoji"); if (useBundledEmojis != null) { Log.d(Config.LOGTAG, "Bundled Emoji checkbox checked: " + isBundledEmojiChecked); - if (Build.VERSION.SDK_INT > Build.VERSION_CODES.O && isBundledEmojiChecked) { - ((CheckBoxPreference) BundledEmojiPreference).setChecked(false); - useBundledEmojis.setEnabled(false); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + if (isBundledEmojiChecked) { + ((CheckBoxPreference) BundledEmojiPreference).setChecked(false); + useBundledEmojis.setEnabled(false); + } + PreferenceCategory UICatergory = (PreferenceCategory) mSettingsFragment.findPreference("UI"); + UICatergory.removePreference(useBundledEmojis); + if (UICatergory.getPreferenceCount() == 0) { + if (mainPreferenceScreen != null) { + mainPreferenceScreen.removePreference(UICatergory); + } + } } } |