Browse Source

Fix expanding status from menu modal in glitch-soc

Fixes #1085
closed-social-glitch-2
Thibaut Girka 5 years ago
committed by ThibG
parent
commit
5b92910664
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      app/javascript/flavours/glitch/components/status_action_bar.js

+ 6
- 2
app/javascript/flavours/glitch/components/status_action_bar.js View File

@ -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 = () => {

Loading…
Cancel
Save