mirror of
https://github.com/discourse/discourse.git
synced 2025-03-29 11:35:45 +08:00

This commit extracts the storage part of the route-scroll-manager into a dedicated service. This provides a key/value store which will reset for each navigation, and restore previous values when the user uses the back/forward buttons in their browser. This gives us a reliable replacement for the old `DiscourseRoute.isPoppedState` function, which would not work under all situations. Previously reverted in e6370decfdcb87737e76b21fe1bbe033af08afaa. This version has been significantly refactored, and includes an additional system spec for the issue we identified.