diff options
author | Wesley <46491851+wscld@users.noreply.github.com> | 2024-09-12 11:59:12 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-12 15:59:12 +0100 |
commit | 86abeb80b9e863b0a1d5eaebe725a676cee4ae09 (patch) | |
tree | 992f2736decc17514bd8d7b611bbb7d23619d242 /src | |
parent | e0d9e75407b053dd3b7a3472f925d8cd4bd92d45 (diff) | |
download | voidsky-86abeb80b9e863b0a1d5eaebe725a676cee4ae09.tar.zst |
Renaming the Follow button to "Follow back" when followed by user (#5281)
* Renaming the follow button to follow back when followed by user * Fixing conditions and reusing existing translation
Diffstat (limited to 'src')
-rw-r--r-- | src/screens/Profile/Header/ProfileHeaderStandard.tsx | 2 | ||||
-rw-r--r-- | src/view/com/profile/FollowButton.tsx | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/screens/Profile/Header/ProfileHeaderStandard.tsx b/src/screens/Profile/Header/ProfileHeaderStandard.tsx index cf5fcb97e..846fa4424 100644 --- a/src/screens/Profile/Header/ProfileHeaderStandard.tsx +++ b/src/screens/Profile/Header/ProfileHeaderStandard.tsx @@ -219,6 +219,8 @@ let ProfileHeaderStandard = ({ <ButtonText> {profile.viewer?.following ? ( <Trans>Following</Trans> + ) : profile.viewer?.followedBy ? ( + <Trans>Follow Back</Trans> ) : ( <Trans>Follow</Trans> )} diff --git a/src/view/com/profile/FollowButton.tsx b/src/view/com/profile/FollowButton.tsx index 42adea3cf..aaa5d3454 100644 --- a/src/view/com/profile/FollowButton.tsx +++ b/src/view/com/profile/FollowButton.tsx @@ -61,7 +61,7 @@ export function FollowButton({ label={_(msg({message: 'Unfollow', context: 'action'}))} /> ) - } else { + } else if (!profile.viewer.followedBy) { return ( <Button type={unfollowedType} @@ -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'}))} + /> + ) } } |