Fix expanding status from menu modal in glitch-soc

Fixes #1085
main
Thibaut Girka 2019-06-02 11:51:49 +02:00 committed by ThibG
parent 17fb1c4345
commit 5b92910664
1 changed files with 6 additions and 2 deletions

View File

@ -151,9 +151,13 @@ export default class StatusActionBar extends ImmutablePureComponent {
handleOpen = () => {
let state = {...this.context.router.history.location.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 = () => {
this.props.onEmbed(this.props.status);