From 769661c0041e1ffc3aec4c0338e9a206f5dd490a Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Wed, 12 Jun 2019 09:46:39 +0200 Subject: Properly handle unboosting statuses from detailed view Fixes #1106 --- app/javascript/flavours/glitch/features/status/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'app') 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) => { -- cgit