Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

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

Fix undefined block (#4471)

* Fix undefined block (#4378)

* Fix undefined block

* Changing text and handling all blocks.

* Tweaks

* Hide follow button in hover card if user blocked

---------

Co-authored-by: Josh <hi@oracularhades.com>

authored by

Eric Bailey
Josh
and committed by
GitHub
7cac413f 212f5750

+22 -4
+6 -3
src/components/ProfileHoverCard/index.web.tsx
··· 370 370 profile: profileShadow, 371 371 logContext: 'ProfileHoverCard', 372 372 }) 373 - const blockHide = profile.viewer?.blocking || profile.viewer?.blockedBy 373 + const isProfileBlocked = 374 + profile.viewer?.blocking || 375 + profile.viewer?.blockedBy || 376 + profile.viewer?.blockingByList 374 377 const following = formatCount(profile.followsCount || 0) 375 378 const followers = formatCount(profile.followersCount || 0) 376 379 const pluralizedFollowers = plural(profile.followersCount || 0, { ··· 401 404 /> 402 405 </Link> 403 406 404 - {!isMe && ( 407 + {!isMe && !isProfileBlocked && ( 405 408 <Button 406 409 size="small" 407 410 color={profileShadow.viewer?.following ? 'secondary' : 'primary'} ··· 439 442 </View> 440 443 </Link> 441 444 442 - {!blockHide && ( 445 + {!isProfileBlocked && ( 443 446 <> 444 447 <View style={[a.flex_row, a.flex_wrap, a.gap_md, a.pt_xs]}> 445 448 <InlineLinkText
+16 -1
src/view/com/posts/FeedItem.tsx
··· 196 196 }, 197 197 ] 198 198 199 + const isParentBlocked = Boolean( 200 + parentAuthor?.viewer?.blockedBy || 201 + parentAuthor?.viewer?.blocking || 202 + parentAuthor?.viewer?.blockingByList, 203 + ) 204 + 199 205 return ( 200 206 <Link 201 207 testID={`feedItem-by-${post.author.handle}`} ··· 320 326 onOpenAuthor={onOpenAuthor} 321 327 /> 322 328 {!isThreadChild && showReplyTo && parentAuthor && ( 323 - <ReplyToLabel profile={parentAuthor} /> 329 + <ReplyToLabel 330 + profile={ 331 + isParentBlocked 332 + ? { 333 + ...parentAuthor, 334 + displayName: _(msg`a blocked user`), 335 + } 336 + : parentAuthor 337 + } 338 + /> 324 339 )} 325 340 <LabelsOnMyPost post={post} /> 326 341 <PostContent