diff options
author | Kit Redgrave <qwertyitis@gmail.com> | 2017-02-05 19:51:56 -0600 |
---|---|---|
committer | Kit Redgrave <qwertyitis@gmail.com> | 2017-03-01 22:31:21 -0600 |
commit | 442fdbfc5309f46c23a073829e5fe16d10c7c6ca (patch) | |
tree | ee8195e874e83722990cfaca7b65fc54383caaf9 /app/assets/javascripts/components/features/account_timeline/containers/header_container.jsx | |
parent | 89fc2d7f4810ecdf66b17543f4603c1089a0c3f5 (diff) |
Mute button progress so far. WIP, doesn't entirely work correctly.
Diffstat (limited to 'app/assets/javascripts/components/features/account_timeline/containers/header_container.jsx')
-rw-r--r-- | app/assets/javascripts/components/features/account_timeline/containers/header_container.jsx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/assets/javascripts/components/features/account_timeline/containers/header_container.jsx b/app/assets/javascripts/components/features/account_timeline/containers/header_container.jsx index e4ce905fe..8472d25a5 100644 --- a/app/assets/javascripts/components/features/account_timeline/containers/header_container.jsx +++ b/app/assets/javascripts/components/features/account_timeline/containers/header_container.jsx @@ -5,7 +5,9 @@ import { followAccount, unfollowAccount, blockAccount, - unblockAccount + unblockAccount, + muteAccount, + unmuteAccount } from '../../../actions/accounts'; import { mentionCompose } from '../../../actions/compose'; import { initReport } from '../../../actions/reports'; @@ -44,6 +46,14 @@ const mapDispatchToProps = dispatch => ({ onReport (account) { dispatch(initReport(account)); + }, + + onMute (account) { + if (account.getIn(['relationship', 'muting'])) { + dispatch(unmuteAccount(account.get('id'))); + } else { + dispatch(muteAccount(account.get('id'))); + } } }); |