Skip to content

Commit

Permalink
[Beta blocking] Fix missing pinned icon when it is the only icon (#4751)
Browse files Browse the repository at this point in the history
* Fix missing pinned icon when it is the only icon for a remote participant

* Change files
  • Loading branch information
mgamis-msft authored Jun 18, 2024
1 parent e8e57c5 commit 324e0ca
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "patch",
"area": "fix",
"workstream": "Pinned participants",
"comment": "Fix missing pinned icon when it is the only icon for a remote participant",
"packageName": "@azure/communication-react",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "patch",
"area": "fix",
"workstream": "Pinned participants",
"comment": "Fix missing pinned icon when it is the only icon for a remote participant",
"packageName": "@azure/communication-react",
"email": "[email protected]",
"dependentChangeType": "patch"
}
8 changes: 4 additions & 4 deletions packages/react-components/src/components/ParticipantList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,10 @@ const onRenderParticipantDefault = (

const callingPalette = (theme as unknown as CallingTheme).callingPalette;

const isPinned = pinnedParticipants && pinnedParticipants?.includes(participant.userId);

const onRenderIcon =
callingParticipant?.isScreenSharing || callingParticipant?.isMuted || callingParticipant?.raisedHand
callingParticipant?.isScreenSharing || callingParticipant?.isMuted || callingParticipant?.raisedHand || isPinned
? () => (
<Stack horizontal={true} tokens={{ childrenGap: '0.5rem' }}>
{callingParticipant.raisedHand && (
Expand Down Expand Up @@ -189,9 +191,7 @@ const onRenderParticipantDefault = (
)}
{callingParticipant.spotlight && <Icon iconName="ParticipantItemSpotlighted" className={iconStyles} />}

{pinnedParticipants && pinnedParticipants?.includes(participant.userId) && (
<Icon iconName="ParticipantItemPinned" className={iconStyles} />
)}
{isPinned && <Icon iconName="ParticipantItemPinned" className={iconStyles} />}
</Stack>
)
: () => null;
Expand Down

0 comments on commit 324e0ca

Please sign in to comment.