7182 person avatar is not the same color in emails and calendar (#7185)

Fixes #7182 and displayName in calendar
This commit is contained in:
Raphaël Bosi
2024-09-21 00:35:39 +02:00
committed by GitHub
parent c97c71762e
commit 20d06b3c0f
3 changed files with 12 additions and 2 deletions

View File

@ -176,7 +176,7 @@ export const CalendarEventRow = ({
: participant.displayName
}
placeholderColorSeed={
participant.workspaceMemberId ?? participant.personId
participant.workspaceMemberId || participant.personId
}
type="rounded"
/>

View File

@ -1,5 +1,5 @@
import { useRef } from 'react';
import styled from '@emotion/styled';
import { useRef } from 'react';
import { useRecoilCallback } from 'recoil';
import { Avatar, GRAY_SCALE } from 'twenty-ui';
@ -155,12 +155,20 @@ export const EmailThreadPreview = ({
<Avatar
avatarUrl={thread?.firstParticipant?.avatarUrl}
placeholder={thread.firstParticipant.displayName}
placeholderColorSeed={
thread.firstParticipant.workspaceMemberId ||
thread.firstParticipant.personId
}
type="rounded"
/>
{thread?.lastTwoParticipants?.[0] && (
<StyledAvatar
avatarUrl={thread.lastTwoParticipants[0].avatarUrl}
placeholder={thread.lastTwoParticipants[0].displayName}
placeholderColorSeed={
thread.lastTwoParticipants[0].workspaceMemberId ||
thread.lastTwoParticipants[0].personId
}
type="rounded"
/>
)}

View File

@ -93,6 +93,8 @@ export class TimelineCalendarEventService {
participant.person?.name?.lastName ||
participant.workspaceMember?.name.firstName ||
participant.workspaceMember?.name.lastName ||
participant.displayName ||
participant.handle ||
'',
avatarUrl:
participant.person?.avatarUrl ||