Implement public profile endorsements in glitch-soc

Port WebUI changes from f2404de871 to glitch-soc
This commit is contained in:
Thibaut Girka
2018-08-10 16:25:46 +02:00
parent 4e66e0ac04
commit 7067b64de3
5 changed files with 100 additions and 0 deletions

View File

@ -8,6 +8,8 @@ import {
blockAccount,
unblockAccount,
unmuteAccount,
pinAccount,
unpinAccount,
} from 'flavours/glitch/actions/accounts';
import {
mentionCompose,
@ -86,6 +88,14 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
}
},
onEndorseToggle (account) {
if (account.getIn(['relationship', 'endorsed'])) {
dispatch(unpinAccount(account.get('id')));
} else {
dispatch(pinAccount(account.get('id')));
}
},
onReport (account) {
dispatch(initReport(account));
},