From 70e9dd0b5b2c4b2d695334d8b63c6d58cb1619d8 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 3 Oct 2016 18:49:52 +0200 Subject: Blocking will prevent e-mail notifications from blocked user, blocks in UI --- app/assets/javascripts/components/features/account/index.jsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'app/assets/javascripts/components/features/account/index.jsx') diff --git a/app/assets/javascripts/components/features/account/index.jsx b/app/assets/javascripts/components/features/account/index.jsx index 40c06c545..c2389af2e 100644 --- a/app/assets/javascripts/components/features/account/index.jsx +++ b/app/assets/javascripts/components/features/account/index.jsx @@ -5,6 +5,8 @@ import { fetchAccount, followAccount, unfollowAccount, + blockAccount, + unblockAccount, fetchAccountTimeline, expandAccountTimeline } from '../../actions/accounts'; @@ -66,6 +68,14 @@ const Account = React.createClass({ } }, + handleBlock () { + if (this.props.account.getIn(['relationship', 'blocking'])) { + this.props.dispatch(unblockAccount(this.props.account.get('id'))); + } else { + this.props.dispatch(blockAccount(this.props.account.get('id'))); + } + }, + handleReply (status) { this.props.dispatch(replyCompose(status)); }, @@ -104,7 +114,7 @@ const Account = React.createClass({ return (
- +
); -- cgit