From 2fed2edd5e6e5407166ec1233e1c3c0151499579 Mon Sep 17 00:00:00 2001 From: diondiondion Date: Thu, 7 May 2026 11:34:20 +0200 Subject: [PATCH] Hide "Follows you" badge when viewing your own list of followers (#38932) --- .../components/hover_card_account.tsx | 24 ++++++++++--------- .../features/followers/components/list.tsx | 6 ++++- .../mastodon/features/followers/index.tsx | 2 ++ 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/app/javascript/mastodon/components/hover_card_account.tsx b/app/javascript/mastodon/components/hover_card_account.tsx index 1c015e4e807..b85536cfddc 100644 --- a/app/javascript/mastodon/components/hover_card_account.tsx +++ b/app/javascript/mastodon/components/hover_card_account.tsx @@ -154,17 +154,19 @@ export const HoverCardAccount = forwardRef< {(isMutual || isFollower) && ( <> · - {isMutual ? ( - - ) : ( - - )} + + {isMutual ? ( + + ) : ( + + )} + )} diff --git a/app/javascript/mastodon/features/followers/components/list.tsx b/app/javascript/mastodon/features/followers/components/list.tsx index 734409ee55a..6c600d570f3 100644 --- a/app/javascript/mastodon/features/followers/components/list.tsx +++ b/app/javascript/mastodon/features/followers/components/list.tsx @@ -28,6 +28,7 @@ interface AccountListProps { list?: AccountList | null; loadMore: () => void; prependAccountId?: string | null; + withoutFollowsYouBadge?: boolean; scrollKey: string; } @@ -40,6 +41,7 @@ export const AccountList: FC = ({ list, loadMore, prependAccountId, + withoutFollowsYouBadge, scrollKey, }) => { const account = useAccount(accountId); @@ -57,6 +59,7 @@ export const AccountList: FC = ({ key={followerId} accountId={followerId} withBio={false} + badge={withoutFollowsYouBadge ? false : null} /> )) ?? []; @@ -66,11 +69,12 @@ export const AccountList: FC = ({ key={prependAccountId} accountId={prependAccountId} withBio={false} + badge={withoutFollowsYouBadge ? false : null} />, ); } return children; - }, [prependAccountId, list, forceEmptyState]); + }, [prependAccountId, list, forceEmptyState, withoutFollowsYouBadge]); const { multiColumn } = useLayout(); diff --git a/app/javascript/mastodon/features/followers/index.tsx b/app/javascript/mastodon/features/followers/index.tsx index 219462ef6ff..61345cbc975 100644 --- a/app/javascript/mastodon/features/followers/index.tsx +++ b/app/javascript/mastodon/features/followers/index.tsx @@ -9,6 +9,7 @@ import { expandFollowers, fetchFollowers } from '@/mastodon/actions/accounts'; import { useAccount } from '@/mastodon/hooks/useAccount'; import { useAccountId } from '@/mastodon/hooks/useAccountId'; import { useRelationship } from '@/mastodon/hooks/useRelationship'; +import { me } from '@/mastodon/initial_state'; import { selectUserListWithoutMe } from '@/mastodon/selectors/user_lists'; import { useAppDispatch, useAppSelector } from '@/mastodon/store'; @@ -85,6 +86,7 @@ const Followers: FC = () => { list={followerList} loadMore={loadMore} prependAccountId={followerId} + withoutFollowsYouBadge={accountId === me} scrollKey='followers' /> );