Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

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

Fix for avatar preloading (#7816)

* mobile avatar profile preloading fix

* updating fix to include moderation

* removing comments, adding disableNavigation to PreviewableUserAvatarProps

authored by

Seth Wood and committed by
GitHub
b924c53b c5b831d5

+26 -15
+1
src/view/com/composer/ComposerReplyTo.tsx
··· 77 77 profile={replyTo.author} 78 78 moderation={replyTo.moderation?.ui('avatar')} 79 79 type={replyTo.author.associated?.labeler ? 'labeler' : 'user'} 80 + disableNavigation={true} 80 81 /> 81 82 <View style={styles.replyToPost}> 82 83 <Text type="xl-medium" style={t.atoms.text} numberOfLines={1} emoji>
+25 -15
src/view/com/util/UserAvatar.tsx
··· 66 66 moderation?: ModerationUI 67 67 profile: bsky.profile.AnyProfileView 68 68 disableHoverCard?: boolean 69 + disableNavigation?: boolean 69 70 onBeforePress?: () => void 70 71 } 71 72 ··· 439 440 moderation, 440 441 profile, 441 442 disableHoverCard, 443 + disableNavigation, 442 444 onBeforePress, 443 445 ...rest 444 446 }: PreviewableUserAvatarProps): React.ReactNode => { ··· 449 451 onBeforePress?.() 450 452 precacheProfile(queryClient, profile) 451 453 }, [profile, queryClient, onBeforePress]) 454 + 455 + const avatarEl = ( 456 + <UserAvatar 457 + avatar={profile.avatar} 458 + moderation={moderation} 459 + type={profile.associated?.labeler ? 'labeler' : 'user'} 460 + {...rest} 461 + /> 462 + ) 452 463 453 464 return ( 454 465 <ProfileHoverCard did={profile.did} disable={disableHoverCard}> 455 - <Link 456 - label={_(msg`${profile.displayName || profile.handle}'s avatar`)} 457 - accessibilityHint={_(msg`Opens this profile`)} 458 - to={makeProfileLink({ 459 - did: profile.did, 460 - handle: profile.handle, 461 - })} 462 - onPress={onPress}> 463 - <UserAvatar 464 - avatar={profile.avatar} 465 - moderation={moderation} 466 - type={profile.associated?.labeler ? 'labeler' : 'user'} 467 - {...rest} 468 - /> 469 - </Link> 466 + {disableNavigation ? ( 467 + avatarEl 468 + ) : ( 469 + <Link 470 + label={_(msg`${profile.displayName || profile.handle}'s avatar`)} 471 + accessibilityHint={_(msg`Opens this profile`)} 472 + to={makeProfileLink({ 473 + did: profile.did, 474 + handle: profile.handle, 475 + })} 476 + onPress={onPress}> 477 + {avatarEl} 478 + </Link> 479 + )} 470 480 </ProfileHoverCard> 471 481 ) 472 482 }