mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 16:57:50 +00:00
parent
f72f75ee61
commit
381547d668
@ -359,7 +359,7 @@ public class RecipientPreferenceActivity extends PassphraseRequiredActionBarActi
|
||||
colorPreference.setColors(MaterialColors.CONVERSATION_PALETTE.asConversationColorArray(getActivity()));
|
||||
colorPreference.setColor(recipient.getColor().toActionBarColor(getActivity()));
|
||||
|
||||
aboutPreference.setTitle(PhoneNumberUtils.formatNumber(recipient.getAddress().toPhoneString()));
|
||||
aboutPreference.setTitle(formatAddress(recipient.getAddress()));
|
||||
aboutPreference.setSummary(recipient.getCustomLabel());
|
||||
aboutPreference.setSecure(recipient.getRegistered() == RecipientDatabase.RegisteredState.REGISTERED);
|
||||
|
||||
@ -388,6 +388,12 @@ public class RecipientPreferenceActivity extends PassphraseRequiredActionBarActi
|
||||
}
|
||||
}
|
||||
|
||||
private @NonNull String formatAddress(@NonNull Address address) {
|
||||
if (address.isPhone()) return PhoneNumberUtils.formatNumber(address.toPhoneString());
|
||||
else if (address.isEmail()) return address.toEmailString();
|
||||
else return "";
|
||||
}
|
||||
|
||||
private @NonNull String getRingtoneSummary(@NonNull Context context, @Nullable Uri ringtone) {
|
||||
if (ringtone == null) {
|
||||
return context.getString(R.string.preferences__default);
|
||||
|
Loading…
x
Reference in New Issue
Block a user