From 6c76a7a90778e6b0f1daf33ff6a2725079c8f335 Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 16 Sep 2024 15:20:44 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20cancel=20follow=20request=20button=20some?= =?UTF-8?q?times=20saying=20=E2=80=9CFollow=20back=E2=80=9D=20(#31934)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/javascript/mastodon/components/follow_button.tsx | 4 ++-- .../mastodon/features/account/components/header.jsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/javascript/mastodon/components/follow_button.tsx b/app/javascript/mastodon/components/follow_button.tsx index 222789318e..46314af309 100644 --- a/app/javascript/mastodon/components/follow_button.tsx +++ b/app/javascript/mastodon/components/follow_button.tsx @@ -75,10 +75,10 @@ export const FollowButton: React.FC<{ label = ; } else if (relationship.following && relationship.followed_by) { label = intl.formatMessage(messages.mutual); - } else if (!relationship.following && relationship.followed_by) { - label = intl.formatMessage(messages.followBack); } else if (relationship.following || relationship.requested) { label = intl.formatMessage(messages.unfollow); + } else if (relationship.followed_by) { + label = intl.formatMessage(messages.followBack); } else { label = intl.formatMessage(messages.follow); } diff --git a/app/javascript/mastodon/features/account/components/header.jsx b/app/javascript/mastodon/features/account/components/header.jsx index 1326874e50..6583c1f604 100644 --- a/app/javascript/mastodon/features/account/components/header.jsx +++ b/app/javascript/mastodon/features/account/components/header.jsx @@ -92,10 +92,10 @@ const messageForFollowButton = relationship => { if (relationship.get('following') && relationship.get('followed_by')) { return messages.mutual; - } else if (!relationship.get('following') && relationship.get('followed_by')) { - return messages.followBack; } else if (relationship.get('following') || relationship.get('requested')) { return messages.unfollow; + } else if (relationship.get('followed_by')) { + return messages.followBack; } else { return messages.follow; }