Merge remote-tracking branch 'parent/main' into kbtopic-remove-quote

This commit is contained in:
KMY 2025-06-12 10:17:21 +09:00
commit f3c3ea42c2
301 changed files with 6618 additions and 3070 deletions

View file

@ -45,6 +45,19 @@ export const HoverCardAccount = forwardRef<
const { familiarFollowers } = useFetchFamiliarFollowers({ accountId });
const relationship = useAppSelector((state) =>
accountId ? state.relationships.get(accountId) : undefined,
);
const isMutual = relationship?.followed_by && relationship.following;
const isFollower = relationship?.followed_by;
const hasRelationshipLoaded = !!relationship;
const shouldDisplayFamiliarFollowers =
familiarFollowers.length > 0 &&
hasRelationshipLoaded &&
!isMutual &&
!isFollower;
return (
<div
ref={ref}
@ -86,7 +99,7 @@ export const HoverCardAccount = forwardRef<
renderer={FollowersCounter}
isHide={account.other_settings.hide_followers_count}
/>
{familiarFollowers.length > 0 && (
{shouldDisplayFamiliarFollowers && (
<>
&middot;
<div className='hover-card__familiar-followers'>
@ -102,6 +115,22 @@ export const HoverCardAccount = forwardRef<
</div>
</>
)}
{(isMutual || isFollower) && (
<>
&middot;
{isMutual ? (
<FormattedMessage
id='account.mutual'
defaultMessage='You follow each other'
/>
) : (
<FormattedMessage
id='account.follows_you'
defaultMessage='Follows you'
/>
)}
</>
)}
</div>
<FollowButton accountId={accountId} />