Show the system contacts icon in more places

This commit is contained in:
Jamie Kyle 2024-03-25 12:22:35 -07:00 committed by GitHub
parent 6bc6cc64c4
commit f29fc7cf9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 132 additions and 34 deletions

View file

@ -17,6 +17,7 @@ import { Intl } from '../Intl';
import { ConfirmationDialog } from '../ConfirmationDialog';
import { isSignalConversation } from '../../util/isSignalConversation';
import { isInSystemContacts } from '../../util/isInSystemContacts';
import { InContactsIcon } from '../InContactsIcon';
export type ContactListItemConversationType = Pick<
ConversationType,
@ -281,7 +282,25 @@ export const ContactListItem: FunctionComponent<PropsType> = React.memo(
/>
}
trailing={trailing}
title={headerName}
title={
<>
{headerName}
{isInSystemContacts({
type,
name,
systemGivenName,
systemFamilyName,
}) && (
<span>
{' '}
<InContactsIcon
className="ContactListItem__contact-icon"
i18n={i18n}
/>
</span>
)}
</>
}
subtitle={messageText}
subtitleMaxLines={1}
onClick={onClick ? () => onClick(id) : undefined}