mirror of
https://github.com/mastodon/mastodon.git
synced 2025-10-06 00:52:42 +00:00
Prioritise unmute over unfollow
This commit is contained in:
parent
23f6b1905e
commit
6fccf8cdfd
|
@ -94,14 +94,14 @@ export const FollowButton: React.FC<{
|
||||||
|
|
||||||
if (accountId === me) {
|
if (accountId === me) {
|
||||||
return;
|
return;
|
||||||
|
} else if (relationship.muting) {
|
||||||
|
dispatch(unmuteAccount(accountId));
|
||||||
} else if (account && (relationship.following || relationship.requested)) {
|
} else if (account && (relationship.following || relationship.requested)) {
|
||||||
dispatch(
|
dispatch(
|
||||||
openModal({ modalType: 'CONFIRM_UNFOLLOW', modalProps: { account } }),
|
openModal({ modalType: 'CONFIRM_UNFOLLOW', modalProps: { account } }),
|
||||||
);
|
);
|
||||||
} else if (relationship.blocking) {
|
} else if (relationship.blocking) {
|
||||||
dispatch(unblockAccount(accountId));
|
dispatch(unblockAccount(accountId));
|
||||||
} else if (relationship.muting) {
|
|
||||||
dispatch(unmuteAccount(accountId));
|
|
||||||
} else {
|
} else {
|
||||||
dispatch(followAccount(accountId));
|
dispatch(followAccount(accountId));
|
||||||
}
|
}
|
||||||
|
@ -124,12 +124,12 @@ export const FollowButton: React.FC<{
|
||||||
label = intl.formatMessage(messages.editProfile);
|
label = intl.formatMessage(messages.editProfile);
|
||||||
} else if (!relationship) {
|
} else if (!relationship) {
|
||||||
label = <LoadingIndicator />;
|
label = <LoadingIndicator />;
|
||||||
|
} else if (relationship.muting) {
|
||||||
|
label = intl.formatMessage(messages.unmute);
|
||||||
} else if (relationship.following) {
|
} else if (relationship.following) {
|
||||||
label = intl.formatMessage(messages.unfollow);
|
label = intl.formatMessage(messages.unfollow);
|
||||||
} else if (relationship.blocking) {
|
} else if (relationship.blocking) {
|
||||||
label = intl.formatMessage(messages.unblock);
|
label = intl.formatMessage(messages.unblock);
|
||||||
} else if (relationship.muting) {
|
|
||||||
label = intl.formatMessage(messages.unmute);
|
|
||||||
} else if (relationship.requested) {
|
} else if (relationship.requested) {
|
||||||
label = intl.formatMessage(messages.followRequestCancel);
|
label = intl.formatMessage(messages.followRequestCancel);
|
||||||
} else if (relationship.followed_by && !account?.locked) {
|
} else if (relationship.followed_by && !account?.locked) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user