Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

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

Show social proof in hovercards (#4502)

* Add social proof to hovercards

* Close it more reliably

authored by

dan and committed by
GitHub
ebd4f93b a55f9246

+22 -1
+7 -1
src/components/KnownFollowers.tsx
··· 8 8 import {sanitizeDisplayName} from 'lib/strings/display-names' 9 9 import {UserAvatar} from '#/view/com/util/UserAvatar' 10 10 import {atoms as a, useTheme} from '#/alf' 11 - import {Link} from '#/components/Link' 11 + import {Link, LinkProps} from '#/components/Link' 12 12 import {Text} from '#/components/Typography' 13 13 14 14 const AVI_SIZE = 30 ··· 29 29 export function KnownFollowers({ 30 30 profile, 31 31 moderationOpts, 32 + onLinkPress, 32 33 }: { 33 34 profile: AppBskyActorDefs.ProfileViewDetailed 34 35 moderationOpts: ModerationOpts 36 + onLinkPress?: LinkProps['onPress'] 35 37 }) { 36 38 const cache = React.useRef<Map<string, AppBskyActorDefs.KnownFollowers>>( 37 39 new Map(), ··· 56 58 profile={profile} 57 59 cachedKnownFollowers={cachedKnownFollowers} 58 60 moderationOpts={moderationOpts} 61 + onLinkPress={onLinkPress} 59 62 /> 60 63 ) 61 64 } ··· 67 70 profile, 68 71 moderationOpts, 69 72 cachedKnownFollowers, 73 + onLinkPress, 70 74 }: { 71 75 profile: AppBskyActorDefs.ProfileViewDetailed 72 76 moderationOpts: ModerationOpts 73 77 cachedKnownFollowers: AppBskyActorDefs.KnownFollowers 78 + onLinkPress?: LinkProps['onPress'] 74 79 }) { 75 80 const t = useTheme() 76 81 const {_} = useLingui() ··· 102 107 label={_( 103 108 msg`Press to view followers of this account that you also follow`, 104 109 )} 110 + onPress={onLinkPress} 105 111 to={makeProfileLink(profile, 'known-followers')} 106 112 style={[ 107 113 a.flex_1,
+15
src/components/ProfileHoverCard/index.web.tsx
··· 22 22 import {useRichText} from '#/components/hooks/useRichText' 23 23 import {Check_Stroke2_Corner0_Rounded as Check} from '#/components/icons/Check' 24 24 import {PlusLarge_Stroke2_Corner0_Rounded as Plus} from '#/components/icons/Plus' 25 + import { 26 + KnownFollowers, 27 + shouldShowKnownFollowers, 28 + } from '#/components/KnownFollowers' 25 29 import {InlineLinkText, Link} from '#/components/Link' 26 30 import {Loader} from '#/components/Loader' 27 31 import {Portal} from '#/components/Portal' ··· 473 477 /> 474 478 </View> 475 479 ) : undefined} 480 + 481 + {!isMe && 482 + shouldShowKnownFollowers(profile.viewer?.knownFollowers) && ( 483 + <View style={[a.flex_row, a.align_center, a.gap_sm, a.pt_md]}> 484 + <KnownFollowers 485 + profile={profile} 486 + moderationOpts={moderationOpts} 487 + onLinkPress={hide} 488 + /> 489 + </View> 490 + )} 476 491 </> 477 492 )} 478 493 </View>