Fix call participant emoji name display

This commit is contained in:
ayumi-signal 2024-01-19 12:11:55 -08:00 committed by GitHub
parent 951e39a8f7
commit 7fe17d2073
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 40 additions and 23 deletions

View file

@ -369,6 +369,8 @@ export function GroupCallYourHandRaised(): JSX.Element {
);
}
const PARTICIPANT_EMOJIS = ['❤️', '🤔', '✨', '😂', '🦄'] as const;
// We generate these upfront so that the list is stable when you move the slider.
const allRemoteParticipants = times(MAX_PARTICIPANTS).map(index => ({
aci: generateAci(),
@ -381,7 +383,13 @@ const allRemoteParticipants = times(MAX_PARTICIPANTS).map(index => ({
videoAspectRatio: Math.random() < 0.7 ? 1.3 : Math.random() * 0.4 + 0.6,
...getDefaultConversationWithServiceId({
isBlocked: index === 10 || index === MAX_PARTICIPANTS - 1,
title: `Participant ${index + 1}`,
title: `Participant ${
(index - 2) % 4 === 0
? PARTICIPANT_EMOJIS[
Math.floor((index - 2) / 4) % PARTICIPANT_EMOJIS.length
]
: ''
} ${index + 1}`,
}),
}));