diff options
author | Thibaut Girka <thib@sitedethib.com> | 2019-04-15 22:23:05 +0200 |
---|---|---|
committer | ThibG <thib@sitedethib.com> | 2019-04-17 18:40:40 +0200 |
commit | e3c1472040105651fe55158b741c7ba92c1a7332 (patch) | |
tree | 6464148676a8b91cb181835b851e2882448824af /app/javascript/flavours/glitch/components/permalink.js | |
parent | 8d57c0e70ea76b2f482c0919fc815d40352ef477 (diff) |
Shift+click on column Back button to return to last pinable column
Diffstat (limited to 'app/javascript/flavours/glitch/components/permalink.js')
-rw-r--r-- | app/javascript/flavours/glitch/components/permalink.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/components/permalink.js b/app/javascript/flavours/glitch/components/permalink.js index 1ea6a2915..718b02115 100644 --- a/app/javascript/flavours/glitch/components/permalink.js +++ b/app/javascript/flavours/glitch/components/permalink.js @@ -24,7 +24,9 @@ export default class Permalink extends React.PureComponent { if (this.context.router) { e.preventDefault(); - this.context.router.history.push(this.props.to); + let state = {...this.context.router.history.location.state}; + state.mastodonBackSteps = (state.mastodonBackSteps || 0) + 1; + this.context.router.history.push(this.props.to, state); } } } |