diff options
author | Samuel Newman <mozzius@protonmail.com> | 2025-05-10 00:06:06 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-10 00:06:06 +0300 |
commit | a0bd8042621e108f47e09dd096cf0d73fe1cee53 (patch) | |
tree | 0cc120c864ae8fea7f513ff242a1097ece0f1b8b /src/components/ProfileCard.tsx | |
parent | 2e80fa3dac4d869640f5bce8ad43eb401c8e3141 (diff) | |
download | voidsky-a0bd8042621e108f47e09dd096cf0d73fe1cee53.tar.zst |
Live (#8354)
Diffstat (limited to 'src/components/ProfileCard.tsx')
-rw-r--r-- | src/components/ProfileCard.tsx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/components/ProfileCard.tsx b/src/components/ProfileCard.tsx index aa5830eb9..30b26bead 100644 --- a/src/components/ProfileCard.tsx +++ b/src/components/ProfileCard.tsx @@ -8,6 +8,7 @@ import { import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' +import {useActorStatus} from '#/lib/actor-status' import {getModerationCauseKey} from '#/lib/moderation' import {type LogEvents} from '#/lib/statsig/statsig' import {sanitizeDisplayName} from '#/lib/strings/display-names' @@ -132,20 +133,25 @@ export function Avatar({ moderationOpts, onPress, disabledPreview, + liveOverride, }: { profile: bsky.profile.AnyProfileView moderationOpts: ModerationOpts onPress?: () => void disabledPreview?: boolean + liveOverride?: boolean }) { const moderation = moderateProfile(profile, moderationOpts) + const {isActive: live} = useActorStatus(profile) + return disabledPreview ? ( <UserAvatar size={40} avatar={profile.avatar} type={profile.associated?.labeler ? 'labeler' : 'user'} moderation={moderation.ui('avatar')} + live={liveOverride ?? live} /> ) : ( <PreviewableUserAvatar @@ -153,6 +159,7 @@ export function Avatar({ profile={profile} moderation={moderation.ui('avatar')} onBeforePress={onPress} + live={liveOverride ?? live} /> ) } |