From 3278c08c290535e14c9c09559199ed24dd0409c6 Mon Sep 17 00:00:00 2001 From: Surinna Curtis Date: Sat, 9 Sep 2017 05:16:27 -0500 Subject: [PATCH] make the hide/unhide notifications buttons work --- app/javascript/mastodon/components/account.js | 2 ++ app/javascript/mastodon/containers/account_container.js | 3 +++ 2 files changed, 5 insertions(+) diff --git a/app/javascript/mastodon/components/account.js b/app/javascript/mastodon/components/account.js index faf697c639c..5a0c1c1c82a 100644 --- a/app/javascript/mastodon/components/account.js +++ b/app/javascript/mastodon/components/account.js @@ -44,9 +44,11 @@ export default class Account extends ImmutablePureComponent { } handleMuteNotifications = () => { + this.props.onMuteNotifications(this.props.account, true); } handleUnmuteNotifications = () => { + this.props.onMuteNotifications(this.props.account, false); } render () { diff --git a/app/javascript/mastodon/containers/account_container.js b/app/javascript/mastodon/containers/account_container.js index 7c77cb76495..79e9e6e9827 100644 --- a/app/javascript/mastodon/containers/account_container.js +++ b/app/javascript/mastodon/containers/account_container.js @@ -63,6 +63,9 @@ const mapDispatchToProps = (dispatch, { intl }) => ({ } }, + onMuteNotifications (account, notifications) { + dispatch(muteAccount(account.get('id'), notifications)); + } }); export default injectIntl(connect(makeMapStateToProps, mapDispatchToProps)(Account));