From fc65917fc3abdeb8783939f097841628a87ee6cd Mon Sep 17 00:00:00 2001 From: Jamie Kyle <113370520+jamiebuilds-signal@users.noreply.github.com> Date: Thu, 28 Mar 2024 15:28:50 -0700 Subject: [PATCH] Hide nicknames and notes on note to self --- ts/components/conversation/AboutContactModal.tsx | 7 +++++-- ts/components/conversation/ContactModal.tsx | 4 ++-- .../conversation-details/ConversationDetails.tsx | 4 ++-- ts/util/nicknames.ts | 13 +++++++++++++ 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/ts/components/conversation/AboutContactModal.tsx b/ts/components/conversation/AboutContactModal.tsx index 8aa4559ce9bc..bc4ff3505287 100644 --- a/ts/components/conversation/AboutContactModal.tsx +++ b/ts/components/conversation/AboutContactModal.tsx @@ -12,7 +12,10 @@ import { UserText } from '../UserText'; import { SharedGroupNames } from '../SharedGroupNames'; import { About } from './About'; import { Intl } from '../Intl'; -import { areNicknamesEnabled } from '../../util/nicknames'; +import { + areNicknamesEnabled, + canHaveNicknameAndNote, +} from '../../util/nicknames'; function muted(parts: Array) { return ( @@ -146,7 +149,7 @@ export function AboutContactModal({
- {areNicknamesEnabled() && + {canHaveNicknameAndNote(conversation) && conversation.nicknameGivenName && conversation.titleNoNickname ? ( diff --git a/ts/components/conversation/ContactModal.tsx b/ts/components/conversation/ContactModal.tsx index de169497c0ec..e3b6147e4a24 100644 --- a/ts/components/conversation/ContactModal.tsx +++ b/ts/components/conversation/ContactModal.tsx @@ -25,7 +25,7 @@ import { UserText } from '../UserText'; import { Button, ButtonIconType, ButtonVariant } from '../Button'; import { isInSystemContacts } from '../../util/isInSystemContacts'; import { InContactsIcon } from '../InContactsIcon'; -import { areNicknamesEnabled } from '../../util/nicknames'; +import { canHaveNicknameAndNote } from '../../util/nicknames'; export type PropsDataType = { areWeASubscriber: boolean; @@ -306,7 +306,7 @@ export function ContactModal({ )}
- {areNicknamesEnabled() && !contact.isMe && ( + {canHaveNicknameAndNote(contact) && (