mirror of
https://github.com/mastodon/mastodon.git
synced 2026-05-09 04:22:42 -05:00
Hide "Follows you" badge when viewing your own list of followers (#38932)
This commit is contained in:
parent
92c9fda9e6
commit
2fed2edd5e
|
|
@ -154,17 +154,19 @@ export const HoverCardAccount = forwardRef<
|
|||
{(isMutual || isFollower) && (
|
||||
<>
|
||||
·
|
||||
{isMutual ? (
|
||||
<FormattedMessage
|
||||
id='account.mutual'
|
||||
defaultMessage='You follow each other'
|
||||
/>
|
||||
) : (
|
||||
<FormattedMessage
|
||||
id='account.follows_you'
|
||||
defaultMessage='Follows you'
|
||||
/>
|
||||
)}
|
||||
<span>
|
||||
{isMutual ? (
|
||||
<FormattedMessage
|
||||
id='account.mutual'
|
||||
defaultMessage='You follow each other'
|
||||
/>
|
||||
) : (
|
||||
<FormattedMessage
|
||||
id='account.follows_you'
|
||||
defaultMessage='Follows you'
|
||||
/>
|
||||
)}
|
||||
</span>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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<AccountListProps> = ({
|
|||
list,
|
||||
loadMore,
|
||||
prependAccountId,
|
||||
withoutFollowsYouBadge,
|
||||
scrollKey,
|
||||
}) => {
|
||||
const account = useAccount(accountId);
|
||||
|
|
@ -57,6 +59,7 @@ export const AccountList: FC<AccountListProps> = ({
|
|||
key={followerId}
|
||||
accountId={followerId}
|
||||
withBio={false}
|
||||
badge={withoutFollowsYouBadge ? false : null}
|
||||
/>
|
||||
)) ?? [];
|
||||
|
||||
|
|
@ -66,11 +69,12 @@ export const AccountList: FC<AccountListProps> = ({
|
|||
key={prependAccountId}
|
||||
accountId={prependAccountId}
|
||||
withBio={false}
|
||||
badge={withoutFollowsYouBadge ? false : null}
|
||||
/>,
|
||||
);
|
||||
}
|
||||
return children;
|
||||
}, [prependAccountId, list, forceEmptyState]);
|
||||
}, [prependAccountId, list, forceEmptyState, withoutFollowsYouBadge]);
|
||||
|
||||
const { multiColumn } = useLayout();
|
||||
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
/>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user