about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-06-12 09:46:39 +0200
committermultiple creatures <dev@multiple-creature.party>2019-11-26 22:20:24 -0600
commit769661c0041e1ffc3aec4c0338e9a206f5dd490a (patch)
tree97c81d99836b3a031972f298c9f0cfdc88000dd4 /app
parente11ea14bc5146cdf2e157280e79113049a71723b (diff)
Properly handle unboosting statuses from detailed view
Fixes #1106
Diffstat (limited to 'app')
-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) => {