|
|
|
@ -219,16 +219,13 @@ public class RecipientPreferenceActivity extends PassphraseRequiredActionBarActi
|
|
|
|
|
vibratePreference.setValueIndex(2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
colorPreference.setEnabled(recipients.isSingleRecipient() && !recipients.isGroupRecipient());
|
|
|
|
|
colorPreference.setChoices(MaterialColors.CONVERSATION_PALETTE.asConversationColorArray(getActivity()));
|
|
|
|
|
colorPreference.setValue(recipients.getColor().toActionBarColor(getActivity()));
|
|
|
|
|
|
|
|
|
|
if (!recipients.isSingleRecipient() || recipients.isGroupRecipient()) {
|
|
|
|
|
blockPreference.setEnabled(false);
|
|
|
|
|
identityPreference.setEnabled(false);
|
|
|
|
|
this.getPreferenceScreen().removePreference(colorPreference);
|
|
|
|
|
this.getPreferenceScreen().removePreference(blockPreference);
|
|
|
|
|
this.getPreferenceScreen().removePreference(identityPreference);
|
|
|
|
|
} else {
|
|
|
|
|
blockPreference.setEnabled(true);
|
|
|
|
|
identityPreference.setEnabled(true);
|
|
|
|
|
colorPreference.setChoices(MaterialColors.CONVERSATION_PALETTE.asConversationColorArray(getActivity()));
|
|
|
|
|
colorPreference.setValue(recipients.getColor().toActionBarColor(getActivity()));
|
|
|
|
|
|
|
|
|
|
if (recipients.isBlocked()) blockPreference.setTitle(R.string.RecipientPreferenceActivity_unblock);
|
|
|
|
|
else blockPreference.setTitle(R.string.RecipientPreferenceActivity_block);
|
|
|
|
|