mastodon/app/javascript/flavours/glitch
Thibaut Girka cc396f085d Use history.state to decide whether we should goBack() or go to / (fixes #247)
So far, glitch-soc used history.length to decide whether to call `goBack()` or
go to / in order to not leave the webUI. This made clicking the “Back” button
go to the “Getting started” column instead of going back in the browser's
history when such an action would leave the web UI, but also when:
- The WebUI is refreshed (F5)
- A tab is restored
- The history length reaches its maximum (e.g., 50 in Firefox)

This commit fixes these shortcomings by checking `window.history.state`.
Indeed, we only want to go back in the browser's history when the current
location has been reached from within the WebUI, which only happens via
`pushState` as far as I know. Since browser store the serialized state in
the browser history, this also survives page reload and session restoration.
2018-05-31 14:39:02 +02:00
..
actions [Glitch] Use randomized setTimeout when fallback-polling and re-add since_id 2018-05-29 21:25:28 +02:00
components Use history.state to decide whether we should goBack() or go to / (fixes #247) 2018-05-31 14:39:02 +02:00
containers [Glitch] Add option to show only local toots in timeline preview 2018-05-27 20:39:25 +02:00
features Use history.state to decide whether we should goBack() or go to / (fixes #247) 2018-05-31 14:39:02 +02:00
images Port 7badad7797 to glitch frontend 2018-01-18 10:25:37 -06:00
locales 🌍: 🇵🇱⬆️ 2018-04-27 14:15:38 +02:00
middleware Rename themes -> flavours ? ? 2017-12-03 23:26:40 -08:00
packs [Glitch] Combine similar components into one on public UI 2018-05-17 18:37:00 +02:00
reducers [Glitch] Fix gap insertion for timeline disconnection 2018-05-29 21:25:28 +02:00
selectors [Glitch] Profile redirect notes 2018-03-29 14:59:20 +02:00
store Rename themes -> flavours ? ? 2017-12-03 23:26:40 -08:00
styles [Glitch] Improve load gap styling in web UI 2018-05-29 21:25:28 +02:00
util Use history.state to decide whether we should goBack() or go to / (fixes #247) 2018-05-31 14:39:02 +02:00
names.yml i18n: Update Polish translation 2018-01-04 14:42:58 +01:00
theme.yml Fix mailer to use webpack core 2018-01-15 21:17:03 -08:00