diff options
author | Thibaut Girka <thib@sitedethib.com> | 2019-06-02 11:51:49 +0200 |
---|---|---|
committer | ThibG <thib@sitedethib.com> | 2019-06-02 14:11:32 +0200 |
commit | 5b929106647a6aac222c82ffe0d2c5c7bdf2d463 (patch) | |
tree | 738b6e0f5e035f580377732922640f808929c4d7 /app/javascript/flavours/glitch | |
parent | 17fb1c4345348da5a6f9338912824a03d348841f (diff) |
Fix expanding status from menu modal in glitch-soc
Fixes #1085
Diffstat (limited to 'app/javascript/flavours/glitch')
-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 6d1f54c60..4c398fd19 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 = () => { |