diff options
author | Thibaut Girka <thib@sitedethib.com> | 2018-08-10 16:25:46 +0200 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2018-08-10 16:25:46 +0200 |
commit | 7067b64de33f9cd491e97329df266fde5fb49e42 (patch) | |
tree | fa23a187b16bf07635312a7791013aacfc2c4474 /app/javascript/flavours/glitch/features/account_timeline/containers | |
parent | 4e66e0ac045a45a14670bb9492e2babe0c9bafb7 (diff) |
Implement public profile endorsements in glitch-soc
Port WebUI changes from f2404de871f0bdfda5c9aeeeb4c6c4d10a8da8ab to glitch-soc
Diffstat (limited to 'app/javascript/flavours/glitch/features/account_timeline/containers')
-rw-r--r-- | app/javascript/flavours/glitch/features/account_timeline/containers/header_container.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/features/account_timeline/containers/header_container.js b/app/javascript/flavours/glitch/features/account_timeline/containers/header_container.js index fb0edfa88..f5f56d85c 100644 --- a/app/javascript/flavours/glitch/features/account_timeline/containers/header_container.js +++ b/app/javascript/flavours/glitch/features/account_timeline/containers/header_container.js @@ -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)); }, |