|
|
|
@ -20,7 +20,7 @@ import { Avatar } from 'mastodon/components/avatar';
|
|
|
|
|
import { Button } from 'mastodon/components/button';
|
|
|
|
|
import { DisplayName } from 'mastodon/components/display_name';
|
|
|
|
|
import { ShortNumber } from 'mastodon/components/short_number';
|
|
|
|
|
import { autoPlayGif, me, unfollowModal } from 'mastodon/initial_state';
|
|
|
|
|
import { autoPlayGif, me } from 'mastodon/initial_state';
|
|
|
|
|
import { makeGetAccount } from 'mastodon/selectors';
|
|
|
|
|
|
|
|
|
|
const messages = defineMessages({
|
|
|
|
@ -48,7 +48,6 @@ const makeMapStateToProps = () => {
|
|
|
|
|
const mapDispatchToProps = (dispatch, { intl }) => ({
|
|
|
|
|
onFollow(account) {
|
|
|
|
|
if (account.getIn(['relationship', 'following'])) {
|
|
|
|
|
if (unfollowModal) {
|
|
|
|
|
dispatch(
|
|
|
|
|
openModal({
|
|
|
|
|
modalType: 'CONFIRM',
|
|
|
|
@ -64,11 +63,7 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
|
|
|
|
|
onConfirm: () => dispatch(unfollowAccount(account.get('id'))),
|
|
|
|
|
} }),
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
dispatch(unfollowAccount(account.get('id')));
|
|
|
|
|
}
|
|
|
|
|
} else if (account.getIn(['relationship', 'requested'])) {
|
|
|
|
|
if (unfollowModal) {
|
|
|
|
|
dispatch(openModal({
|
|
|
|
|
modalType: 'CONFIRM',
|
|
|
|
|
modalProps: {
|
|
|
|
@ -77,9 +72,6 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
|
|
|
|
|
onConfirm: () => dispatch(unfollowAccount(account.get('id'))),
|
|
|
|
|
},
|
|
|
|
|
}));
|
|
|
|
|
} else {
|
|
|
|
|
dispatch(unfollowAccount(account.get('id')));
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
dispatch(followAccount(account.get('id')));
|
|
|
|
|
}
|
|
|
|
|