mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 04:58:45 +00:00
Do not show add to contacts if there's no e164.
This commit is contained in:
@@ -159,7 +159,7 @@ sealed class ConversationSettingsViewModel(
|
||||
contactLinkState = when {
|
||||
recipient.isSelf || recipient.isReleaseNotes || recipient.isBlocked -> ContactLinkState.NONE
|
||||
recipient.isSystemContact -> ContactLinkState.OPEN
|
||||
recipient.hasE164() -> ContactLinkState.ADD
|
||||
recipient.hasE164() && recipient.shouldShowE164() -> ContactLinkState.ADD
|
||||
else -> ContactLinkState.NONE
|
||||
}
|
||||
)
|
||||
|
||||
@@ -130,7 +130,7 @@ internal object ConversationOptionsMenu {
|
||||
|
||||
if (recipient.isMuted) menuInflater.inflate(R.menu.conversation_muted, menu) else menuInflater.inflate(R.menu.conversation_unmuted, menu)
|
||||
|
||||
if (!recipient.isGroup && (recipient.contactUri == null) && !recipient.isReleaseNotes && !recipient.isSelf && recipient.hasE164()) {
|
||||
if (!recipient.isGroup && recipient.contactUri == null && !recipient.isReleaseNotes && !recipient.isSelf && recipient.hasE164() && recipient.shouldShowE164()) {
|
||||
menuInflater.inflate(R.menu.conversation_add_to_contacts, menu)
|
||||
}
|
||||
|
||||
|
||||
@@ -274,7 +274,7 @@ public final class RecipientBottomSheetDialogFragment extends BottomSheetDialogF
|
||||
buttonStrip.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (recipient.isSystemContact() || recipient.isGroup() || recipient.isSelf() || recipient.isBlocked() || recipient.isReleaseNotes() || !recipient.hasE164()) {
|
||||
if (recipient.isSystemContact() || recipient.isGroup() || recipient.isSelf() || recipient.isBlocked() || recipient.isReleaseNotes() || !recipient.hasE164() || !recipient.shouldShowE164()) {
|
||||
addContactButton.setVisibility(View.GONE);
|
||||
} else {
|
||||
addContactButton.setVisibility(View.VISIBLE);
|
||||
|
||||
Reference in New Issue
Block a user