Skip to content

Commit

Permalink
Fixed bugs with profile flyout not closing
Browse files Browse the repository at this point in the history
  • Loading branch information
SupertigerDev committed Jan 13, 2024
1 parent c30d1fd commit 838cbfa
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/components/message-pane/message-item/MessageItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ interface DetailsProps {
const Details = (props: DetailsProps) => (
<div class={classNames(styles.details)}>

<CustomLink onClick={props.showProfileFlyout} decoration onContextMenu={props.userContextMenu} class={styles.username} href={RouterEndpoints.PROFILE(props.message.createdBy.id)} style={{ color: props.serverMember?.roleColor || "white" }}>
<CustomLink onClick={props.showProfileFlyout} decoration onContextMenu={props.userContextMenu} class={classNames("trigger-profile-flyout", styles.username)} href={RouterEndpoints.PROFILE(props.message.createdBy.id)} style={{ color: props.serverMember?.roleColor || "white" }}>
{props.message.createdBy.username}
</CustomLink>
<Show when={props.isSystemMessage}><SystemMessage message={props.message} /></Show>
Expand Down Expand Up @@ -184,8 +184,7 @@ const MessageItem = (props: MessageItemProps) => {
conditionalClass(isMentioned(), styles.mentioned),
conditionalClass(isSomeoneMentioned(), styles.someoneMentioned),
props.class,
"messageItem",
"trigger-profile-flyout"
"messageItem"
)}
onContextMenu={props.contextMenu}
onMouseEnter={() => setHovered(true)}
Expand All @@ -199,7 +198,7 @@ const MessageItem = (props: MessageItemProps) => {
</Match>
<Match when={!isSystemMessage()}>
<Show when={!isCompact()}>
<Link onClick={showProfileFlyout} onContextMenu={props.userContextMenu} href={RouterEndpoints.PROFILE(props.message.createdBy.id)} class={styles.avatar}>
<Link onClick={showProfileFlyout} onContextMenu={props.userContextMenu} href={RouterEndpoints.PROFILE(props.message.createdBy.id)} class={classNames(styles.avatar, "trigger-profile-flyout")}>
<Avatar animate={hovered()} user={props.message.createdBy} size={40} />
</Link>
</Show>
Expand Down

0 comments on commit 838cbfa

Please sign in to comment.