]> cat aescling's git repositories - mastodon.git/commitdiff
Fix unboost confirmation dialog not showing up on detailed statuses
authorThibaut Girka <thib@sitedethib.com>
Fri, 7 Jun 2019 16:57:10 +0000 (18:57 +0200)
committerThibG <thib@sitedethib.com>
Mon, 10 Jun 2019 14:24:09 +0000 (16:24 +0200)
app/javascript/flavours/glitch/features/status/index.js

index 8722490d9d92ac6f3f8579d85999ca716fa06057..a35de5c4f516558776cb3e3642394d9d3a6b036c 100644 (file)
@@ -237,16 +237,12 @@ export default class Status extends ImmutablePureComponent {
   handleReblogClick = (status, e) => {
     const { settings, dispatch } = this.props;
 
-    if (status.get('reblogged')) {
-      dispatch(unreblog(status));
+    if (settings.get('confirm_boost_missing_media_description') && status.get('media_attachments').some(item => !item.get('description')) && !status.get('reblogged')) {
+      dispatch(openModal('BOOST', { status, onReblog: this.handleModalReblog, missingMediaDescription: true }));
+    } else if ((e && e.shiftKey) || !boostModal) {
+      this.handleModalReblog(status);
     } else {
-      if (settings.get('confirm_boost_missing_media_description') && status.get('media_attachments').some(item => !item.get('description'))) {
-        dispatch(openModal('BOOST', { status, onReblog: this.handleModalReblog, missingMediaDescription: true }));
-      } else if ((e && e.shiftKey) || !boostModal) {
-        this.handleModalReblog(status);
-      } else {
-        dispatch(openModal('BOOST', { status, onReblog: this.handleModalReblog }));
-      }
+      dispatch(openModal('BOOST', { status, onReblog: this.handleModalReblog }));
     }
   }