Allow viewing contact details from group change messages

This commit is contained in:
trevor-signal 2024-02-08 09:36:08 -05:00 committed by GitHub
parent 614bb904b1
commit 59b135ad7e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 39 additions and 11 deletions

View file

@ -16,6 +16,7 @@ export type PropsType = {
module?: string;
preferFirstName?: boolean;
title: string;
onClick?: VoidFunction;
};
export function ContactName({
@ -26,6 +27,7 @@ export function ContactName({
module,
preferFirstName,
title,
onClick,
}: PropsType): JSX.Element {
const getClassName = getClassNamesFor('module-contact-name', module);
@ -35,19 +37,20 @@ export function ContactName({
} else {
text = title || '';
}
const WrappingElement = onClick ? 'button' : 'span';
return (
<span
<WrappingElement
className={classNames(
getClassName(''),
contactNameColor ? getClassName(`--${contactNameColor}`) : null
)}
dir="auto"
onClick={onClick}
>
<Emojify text={text} />
{(isSignalConversation || isMe) && (
<span className="ContactModal__official-badge" />
)}
</span>
</WrappingElement>
);
}