Mute button progress so far. WIP, doesn't entirely work correctly.

This commit is contained in:
Kit Redgrave
2017-02-05 19:51:56 -06:00
parent 89fc2d7f48
commit 442fdbfc53
26 changed files with 390 additions and 33 deletions

View File

@ -5,7 +5,9 @@ import {
followAccount,
unfollowAccount,
blockAccount,
unblockAccount
unblockAccount,
muteAccount,
unmuteAccount,
} from '../actions/accounts';
const makeMapStateToProps = () => {
@ -34,6 +36,14 @@ const mapDispatchToProps = (dispatch) => ({
} else {
dispatch(blockAccount(account.get('id')));
}
},
onMute (account) {
if (account.getIn(['relationship', 'muting'])) {
dispatch(unmuteAccount(account.get('id')));
} else {
dispatch(muteAccount(account.get('id')));
}
}
});

View File

@ -11,7 +11,10 @@ import {
unreblog,
unfavourite
} from '../actions/interactions';
import { blockAccount } from '../actions/accounts';
import {
blockAccount,
muteAccount
} from '../actions/accounts';
import { deleteStatus } from '../actions/statuses';
import { initReport } from '../actions/reports';
import { openMedia } from '../actions/modal';
@ -69,7 +72,11 @@ const mapDispatchToProps = (dispatch) => ({
onReport (status) {
dispatch(initReport(status.get('account'), status));
}
},
onMute (account) {
dispatch(muteAccount(account.get('id')));
},
});