]> cat aescling's git repositories - mastodon.git/commitdiff
Properly handle unboosting statuses from detailed view
authorThibaut Girka <thib@sitedethib.com>
Wed, 12 Jun 2019 07:46:39 +0000 (09:46 +0200)
committerThibG <thib@sitedethib.com>
Wed, 12 Jun 2019 08:12:51 +0000 (10:12 +0200)
Fixes #1106

app/javascript/flavours/glitch/features/status/index.js

index a35de5c4f516558776cb3e3642394d9d3a6b036c..76bfaaffacfec1b267a01cef51b35037e5cf31b8 100644 (file)
@@ -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) => {