Skip to content

Commit

Permalink
Renaming the Follow button to "Follow back" when followed by user (#5281
Browse files Browse the repository at this point in the history
)

* Renaming the follow button to follow back when followed by user

* Fixing conditions and reusing existing translation
  • Loading branch information
wscld authored Sep 12, 2024
1 parent e0d9e75 commit 86abeb8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/screens/Profile/Header/ProfileHeaderStandard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ let ProfileHeaderStandard = ({
<ButtonText>
{profile.viewer?.following ? (
<Trans>Following</Trans>
) : profile.viewer?.followedBy ? (
<Trans>Follow Back</Trans>
) : (
<Trans>Follow</Trans>
)}
Expand Down
11 changes: 10 additions & 1 deletion src/view/com/profile/FollowButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export function FollowButton({
label={_(msg({message: 'Unfollow', context: 'action'}))}
/>
)
} else {
} else if (!profile.viewer.followedBy) {
return (
<Button
type={unfollowedType}
Expand All @@ -70,5 +70,14 @@ export function FollowButton({
label={_(msg({message: 'Follow', context: 'action'}))}
/>
)
} else {
return (
<Button
type={unfollowedType}
labelStyle={labelStyle}
onPress={onPressFollow}
label={_(msg({message: 'Follow Back', context: 'action'}))}
/>
)
}
}

0 comments on commit 86abeb8

Please sign in to comment.