From: Thibaut Girka Date: Wed, 12 Jun 2019 07:46:39 +0000 (+0200) Subject: Properly handle unboosting statuses from detailed view X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=32bdff09c1093b94c784a809e582f1e5f6ff9694;p=mastodon.git Properly handle unboosting statuses from detailed view Fixes #1106 --- 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) => {