about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/account_timeline/containers/header_container.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/javascript/mastodon/features/account_timeline/containers/header_container.js')
-rw-r--r--app/javascript/mastodon/features/account_timeline/containers/header_container.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/javascript/mastodon/features/account_timeline/containers/header_container.js b/app/javascript/mastodon/features/account_timeline/containers/header_container.js
index 8e50ec405..b41eb19d4 100644
--- a/app/javascript/mastodon/features/account_timeline/containers/header_container.js
+++ b/app/javascript/mastodon/features/account_timeline/containers/header_container.js
@@ -67,6 +67,14 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
     dispatch(mentionCompose(account, router));
   },
 
+  onReblogToggle (account) {
+    if (account.getIn(['relationship', 'following', 'reblogs'])) {
+      dispatch(followAccount(account.get('id'), false));
+    } else {
+      dispatch(followAccount(account.get('id'), true));
+    }
+  },
+
   onReport (account) {
     dispatch(initReport(account));
   },