From 1763be29567d9a5b04f5d5246935fe1e092794a7 Mon Sep 17 00:00:00 2001 From: Greyson Parrelli Date: Wed, 30 Jan 2019 16:32:48 -0800 Subject: [PATCH] Hide call settings for groups. --- .../securesms/RecipientPreferenceActivity.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/org/thoughtcrime/securesms/RecipientPreferenceActivity.java b/src/org/thoughtcrime/securesms/RecipientPreferenceActivity.java index 3331641f3..b01616fe7 100644 --- a/src/org/thoughtcrime/securesms/RecipientPreferenceActivity.java +++ b/src/org/thoughtcrime/securesms/RecipientPreferenceActivity.java @@ -363,6 +363,7 @@ public class RecipientPreferenceActivity extends PassphraseRequiredActionBarActi ColorPickerPreference colorPreference = (ColorPickerPreference) this.findPreference(PREFERENCE_COLOR); Preference blockPreference = this.findPreference(PREFERENCE_BLOCK); Preference identityPreference = this.findPreference(PREFERENCE_IDENTITY); + PreferenceCategory callCategory = (PreferenceCategory)this.findPreference("call_settings"); PreferenceCategory aboutCategory = (PreferenceCategory)this.findPreference("about"); PreferenceCategory aboutDivider = (PreferenceCategory)this.findPreference("about_divider"); ContactPreference aboutPreference = (ContactPreference)this.findPreference(PREFERENCE_ABOUT); @@ -386,8 +387,10 @@ public class RecipientPreferenceActivity extends PassphraseRequiredActionBarActi if (recipient.isGroupRecipient()) { if (colorPreference != null) colorPreference.setVisible(false); if (identityPreference != null) identityPreference.setVisible(false); - if (aboutCategory != null) getPreferenceScreen().removePreference(aboutCategory); - if (aboutDivider != null) getPreferenceScreen().removePreference(aboutDivider); + if (callCategory != null) callCategory.setVisible(false); + if (aboutCategory != null) aboutCategory.setVisible(false); + if (aboutDivider != null) aboutDivider.setVisible(false); + if (divider != null) divider.setVisible(false); } else { colorPreference.setColors(MaterialColors.CONVERSATION_PALETTE.asConversationColorArray(getActivity())); colorPreference.setColor(recipient.getColor().toActionBarColor(getActivity()));