diff options
author | Surinna Curtis <ekiru.0@gmail.com> | 2017-08-06 19:43:58 -0300 |
---|---|---|
committer | Surinna Curtis <ekiru.0@gmail.com> | 2017-09-13 21:47:30 -0500 |
commit | b1576c52df3f2008b23e820e867c78bbcfaf78b1 (patch) | |
tree | 42248d8b025c784ce2cf5f7f914d7fdb25b96ebf /app | |
parent | 4612f7caea9086715c7c7405b03bf335f552860f (diff) |
Convert profile header mute to use mute modal
Diffstat (limited to 'app')
-rw-r--r-- | app/javascript/mastodon/features/account_timeline/containers/header_container.js | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/app/javascript/mastodon/features/account_timeline/containers/header_container.js b/app/javascript/mastodon/features/account_timeline/containers/header_container.js index dcee78b3e..3f521f048 100644 --- a/app/javascript/mastodon/features/account_timeline/containers/header_container.js +++ b/app/javascript/mastodon/features/account_timeline/containers/header_container.js @@ -11,6 +11,7 @@ import { unmuteAccount, } from '../../../actions/accounts'; import { mentionCompose } from '../../../actions/compose'; +import { initMuteModal } from '../../../actions/mutes'; import { initReport } from '../../../actions/reports'; import { openModal } from '../../../actions/modal'; import { blockDomain, unblockDomain } from '../../../actions/domain_blocks'; @@ -19,7 +20,6 @@ import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; const messages = defineMessages({ unfollowConfirm: { id: 'confirmations.unfollow.confirm', defaultMessage: 'Unfollow' }, blockConfirm: { id: 'confirmations.block.confirm', defaultMessage: 'Block' }, - muteConfirm: { id: 'confirmations.mute.confirm', defaultMessage: 'Mute' }, blockDomainConfirm: { id: 'confirmations.domain_block.confirm', defaultMessage: 'Hide entire domain' }, }); @@ -77,11 +77,7 @@ const mapDispatchToProps = (dispatch, { intl }) => ({ if (account.getIn(['relationship', 'muting'])) { dispatch(unmuteAccount(account.get('id'))); } else { - dispatch(openModal('CONFIRM', { - message: <FormattedMessage id='confirmations.mute.message' defaultMessage='Are you sure you want to mute {name}?' values={{ name: <strong>@{account.get('acct')}</strong> }} />, - confirm: intl.formatMessage(messages.muteConfirm), - onConfirm: () => dispatch(muteAccount(account.get('id'))), - })); + dispatch(initMuteModal(account)); } }, |