about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-06-12 09:46:39 +0200
committerThibG <thib@sitedethib.com>2019-06-12 10:12:51 +0200
commit32bdff09c1093b94c784a809e582f1e5f6ff9694 (patch)
tree0c5672ea8f13b9484f9f452e43419da3f71a17f6 /app/javascript/flavours/glitch
parentcde30407c6bfaaaa34f8b95c16f1b19cb0c41479 (diff)
Properly handle unboosting statuses from detailed view
Fixes #1106
Diffstat (limited to 'app/javascript/flavours/glitch')
-rw-r--r--app/javascript/flavours/glitch/features/status/index.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/status/index.js b/app/javascript/flavours/glitch/features/status/index.js
index a35de5c4f..76bfaaffa 100644
--- a/app/javascript/flavours/glitch/features/status/index.js
+++ b/app/javascript/flavours/glitch/features/status/index.js
@@ -231,7 +231,13 @@ export default class Status extends ImmutablePureComponent {
   }
 
   handleModalReblog = (status) => {
-    this.props.dispatch(reblog(status));
+    const { dispatch } = this.props;
+
+    if (status.get('reblogged')) {
+      dispatch(unreblog(status));
+    } else {
+      dispatch(reblog(status));
+    }
   }
 
   handleReblogClick = (status, e) => {