From 20fd56410902079582ff1b0ab8393aac27777727 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 faf697c639..5a0c1c1c82 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 7c77cb7649..79e9e6e982 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));