diff options
author | Eric Bailey <git@esb.lol> | 2024-06-10 20:45:23 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-10 20:45:23 -0500 |
commit | 7cac413f3b397fee95681033f075d51c7c4ee153 (patch) | |
tree | 83a43b5254d1e45c26c758fe7a866ebc32b3e682 /src/view/com/posts/FeedItem.tsx | |
parent | 212f5750e3f45b6b6f042058c1819ecd92346baa (diff) | |
download | voidsky-7cac413f3b397fee95681033f075d51c7c4ee153.tar.zst |
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>
Diffstat (limited to 'src/view/com/posts/FeedItem.tsx')
-rw-r--r-- | src/view/com/posts/FeedItem.tsx | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/view/com/posts/FeedItem.tsx b/src/view/com/posts/FeedItem.tsx index 675f23a88..9f6dd3322 100644 --- a/src/view/com/posts/FeedItem.tsx +++ b/src/view/com/posts/FeedItem.tsx @@ -196,6 +196,12 @@ let FeedItemInner = ({ }, ] + const isParentBlocked = Boolean( + parentAuthor?.viewer?.blockedBy || + parentAuthor?.viewer?.blocking || + parentAuthor?.viewer?.blockingByList, + ) + return ( <Link testID={`feedItem-by-${post.author.handle}`} @@ -320,7 +326,16 @@ let FeedItemInner = ({ onOpenAuthor={onOpenAuthor} /> {!isThreadChild && showReplyTo && parentAuthor && ( - <ReplyToLabel profile={parentAuthor} /> + <ReplyToLabel + profile={ + isParentBlocked + ? { + ...parentAuthor, + displayName: _(msg`a blocked user`), + } + : parentAuthor + } + /> )} <LabelsOnMyPost post={post} /> <PostContent |