Bluesky app fork with some witchin' additions ๐Ÿ’ซ
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

[๐Ÿด] Disable hover card when blocked or blocking (#4041)

authored by

Hailey and committed by
GitHub
b635d000 9499d434

+11 -3
+5 -1
src/components/ProfileHoverCard/index.web.tsx
··· 46 46 const isTouchDevice = 'ontouchstart' in window || navigator.maxTouchPoints > 0 47 47 48 48 export function ProfileHoverCard(props: ProfileHoverCardProps) { 49 - return isTouchDevice ? props.children : <ProfileHoverCardInner {...props} /> 49 + if (props.disable || isTouchDevice) { 50 + return props.children 51 + } else { 52 + return <ProfileHoverCardInner {...props} /> 53 + } 50 54 } 51 55 52 56 type State =
+1
src/components/ProfileHoverCard/types.ts
··· 4 4 children: React.ReactElement 5 5 did: string 6 6 inline?: boolean 7 + disable?: boolean 7 8 }
+1
src/screens/Messages/Conversation/index.tsx
··· 277 277 size={32} 278 278 profile={profile} 279 279 moderation={moderation.ui('avatar')} 280 + disable={moderation.blocked} 280 281 /> 281 282 <Text 282 283 style={[a.text_lg, a.font_bold, a.pt_sm, a.pb_2xs]}
+4 -2
src/view/com/util/UserAvatar.tsx
··· 50 50 51 51 interface PreviewableUserAvatarProps extends BaseUserAvatarProps { 52 52 moderation?: ModerationUI 53 + profile: AppBskyActorDefs.ProfileViewBasic 54 + disable?: boolean 53 55 onBeforePress?: () => void 54 - profile: AppBskyActorDefs.ProfileViewBasic 55 56 } 56 57 57 58 const BLUR_AMOUNT = isWeb ? 5 : 100 ··· 383 384 let PreviewableUserAvatar = ({ 384 385 moderation, 385 386 profile, 387 + disable, 386 388 onBeforePress, 387 389 ...rest 388 390 }: PreviewableUserAvatarProps): React.ReactNode => { ··· 395 397 }, [profile, queryClient, onBeforePress]) 396 398 397 399 return ( 398 - <ProfileHoverCard did={profile.did}> 400 + <ProfileHoverCard did={profile.did} disable={disable}> 399 401 <Link 400 402 label={_(msg`See profile`)} 401 403 to={makeProfileLink({