diff --git a/src/components/Pills.tsx b/src/components/Pills.tsx index 412a47159..1f3bb2b97 100644 --- a/src/components/Pills.tsx +++ b/src/components/Pills.tsx @@ -1,7 +1,6 @@ import React from 'react' import {View} from 'react-native' import {BSKY_LABELER_DID, type ModerationCause} from '@atproto/api' -import {Trans} from '@lingui/macro' import {useModerationCauseDescription} from '#/lib/moderation/useModerationCauseDescription' import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' @@ -153,30 +152,3 @@ export function Label({ ) } - -export function FollowsYou({size = 'sm'}: CommonProps) { - const t = useTheme() - - const variantStyles = React.useMemo(() => { - switch (size) { - case 'sm': - case 'lg': - default: - return [ - { - paddingHorizontal: 6, - paddingVertical: 3, - borderRadius: 4, - }, - ] - } - }, [size]) - - return ( - - - Follows You - - - ) -} diff --git a/src/components/ProfileCard.tsx b/src/components/ProfileCard.tsx index 17e3677bc..8722bd37d 100644 --- a/src/components/ProfileCard.tsx +++ b/src/components/ProfileCard.tsx @@ -536,12 +536,19 @@ export function FollowButtonInner({ } } - const unfollowLabel = _( - msg({ - message: 'Following', - comment: 'User is following this account, click to unfollow', - }), - ) + const unfollowLabel = profile.viewer?.followedBy + ? _( + msg({ + message: 'Mutuals', + comment: 'User is following this account, click to unfollow', + }), + ) + : _( + msg({ + message: 'Following', + comment: 'User is following this account, click to unfollow', + }), + ) const followLabel = profile.viewer?.followedBy ? _( msg({ @@ -632,7 +639,6 @@ export function Labels({ return ( - {followedBy && } {modui.alerts.map(alert => ( ))} diff --git a/src/components/ProfileHoverCard/index.web.tsx b/src/components/ProfileHoverCard/index.web.tsx index 0df3d8aee..37b04303a 100644 --- a/src/components/ProfileHoverCard/index.web.tsx +++ b/src/components/ProfileHoverCard/index.web.tsx @@ -495,8 +495,12 @@ function Inner({ variant="solid" label={ profileShadow.viewer?.following - ? _(msg`Following`) - : _(msg`Follow`) + ? profileShadow.viewer?.followedBy + ? _(msg`Mutuals`) + : _(msg`Following`) + : profileShadow.viewer?.followedBy + ? _(msg`Follow back`) + : _(msg`Follow`) } style={enableSquareButtons ? [a.rounded_sm] : [a.rounded_full]} onPress={profileShadow.viewer?.following ? unfollow : follow}> @@ -506,8 +510,12 @@ function Inner({ /> {profileShadow.viewer?.following - ? _(msg`Following`) - : _(msg`Follow`)} + ? profileShadow.viewer?.followedBy + ? _(msg`Mutuals`) + : _(msg`Following`) + : profileShadow.viewer?.followedBy + ? _(msg`Follow back`) + : _(msg`Follow`)} ))} diff --git a/src/screens/PostThread/components/ThreadItemAnchorFollowButton.tsx b/src/screens/PostThread/components/ThreadItemAnchorFollowButton.tsx index ed214d170..a7e859ab7 100644 --- a/src/screens/PostThread/components/ThreadItemAnchorFollowButton.tsx +++ b/src/screens/PostThread/components/ThreadItemAnchorFollowButton.tsx @@ -133,6 +133,8 @@ function PostThreadFollowBtnLoaded({ ) : ( Follow ) + ) : isFollowedBy ? ( + Mutuals ) : ( Following )} diff --git a/src/screens/Profile/Header/Handle.tsx b/src/screens/Profile/Header/Handle.tsx index 00d7db08d..f4050e524 100644 --- a/src/screens/Profile/Header/Handle.tsx +++ b/src/screens/Profile/Header/Handle.tsx @@ -1,6 +1,6 @@ import {View} from 'react-native' import {type AppBskyActorDefs} from '@atproto/api' -import {msg, Trans} from '@lingui/macro' +import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' import {isInvalidHandle, sanitizeHandle} from '#/lib/strings/handles' @@ -22,7 +22,6 @@ export function ProfileHeaderHandle({ const t = useTheme() const {_} = useLingui() const invalidHandle = isInvalidHandle(profile.handle) - const blockHide = profile.viewer?.blocking || profile.viewer?.blockedBy const isBskySocialHandle = profile.handle.endsWith('.bsky.social') const showProfileInHandle = useShowLinkInHandle() const sanitized = sanitizeHandle( @@ -36,13 +35,7 @@ export function ProfileHeaderHandle({ style={[a.flex_row, a.gap_sm, a.align_center, {maxWidth: '100%'}]} pointerEvents={disableTaps ? 'none' : isIOS ? 'auto' : 'box-none'}> - {profile.viewer?.followedBy && !blockHide ? ( - - - Follows you - - - ) : undefined} + } {profile.viewer?.following ? ( - Following + profile.viewer?.followedBy ? ( + Mutuals + ) : ( + Following + ) ) : profile.viewer?.followedBy ? ( Follow back ) : ( diff --git a/src/view/com/profile/ProfileMenu.tsx b/src/view/com/profile/ProfileMenu.tsx index 4ab75c610..9ae569edb 100644 --- a/src/view/com/profile/ProfileMenu.tsx +++ b/src/view/com/profile/ProfileMenu.tsx @@ -78,6 +78,7 @@ let ProfileMenu = ({ const queryClient = useQueryClient() const navigation = useNavigation() const isSelf = currentAccount?.did === profile.did + const isFollowedBy = profile.viewer?.followedBy const isFollowing = profile.viewer?.following const isBlocked = profile.viewer?.blocking || profile.viewer?.blockedBy const isFollowingBlockedAccount = isFollowing && isBlocked @@ -327,7 +328,9 @@ let ProfileMenu = ({ testID="profileHeaderDropdownFollowBtn" label={ isFollowing - ? _(msg`Unfollow account`) + ? isFollowedBy + ? _(msg`Divorce mutual`) + : _(msg`Unfollow account`) : _(msg`Follow account`) } onPress={ @@ -337,7 +340,11 @@ let ProfileMenu = ({ }> {isFollowing ? ( - Unfollow account + isFollowedBy ? ( + Divorce mutual + ) : ( + Unfollow account + ) ) : ( Follow account )}