diff options
author | Thibaut Girka <thib@sitedethib.com> | 2019-06-02 11:51:49 +0200 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-11-19 15:58:46 -0600 |
commit | 5f5ca12f6bf7c9c50e5ee83dba3bf464c3e4a920 (patch) | |
tree | 3405f1dd93fa60f095014e95107a0ef9fbd8c152 /app/javascript/flavours/glitch/components | |
parent | 6de00808bc962830ee1d5c17a42eb8814b2860fd (diff) |
Fix expanding status from menu modal in glitch-soc
Fixes #1085
Diffstat (limited to 'app/javascript/flavours/glitch/components')
-rw-r--r-- | app/javascript/flavours/glitch/components/status_action_bar.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/components/status_action_bar.js b/app/javascript/flavours/glitch/components/status_action_bar.js index 38edcdc4c..fe501f8df 100644 --- a/app/javascript/flavours/glitch/components/status_action_bar.js +++ b/app/javascript/flavours/glitch/components/status_action_bar.js @@ -151,8 +151,12 @@ export default class StatusActionBar extends ImmutablePureComponent { handleOpen = () => { let state = {...this.context.router.history.location.state}; - state.mastodonBackSteps = (state.mastodonBackSteps || 0) + 1; - this.context.router.history.push(`/statuses/${this.props.status.get('id')}`, state); + if (state.mastodonModalOpen) { + this.context.router.history.replace(`/statuses/${this.props.status.get('id')}`, { mastodonBackSteps: (state.mastodonBackSteps || 0) + 1 }); + } else { + state.mastodonBackSteps = (state.mastodonBackSteps || 0) + 1; + this.context.router.history.push(`/statuses/${this.props.status.get('id')}`, state); + } } handleEmbed = () => { |