Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve post page state #1520

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

micahmo
Copy link
Member

@micahmo micahmo commented Aug 9, 2024

Pull Request Description

This PR aims to preserve the state of the post page when navigating out and back in. This is something I've been wanting for a long time (missing this feature from Relay) and I finally got it working! It's done by preserving the PostBloc that is created when we navigate to a post page, as well as moving everything important to the PostState that wasn't already there (such as the list of collapsed comments and scroll position) instead of in the widget state.

Notes

  • We will only save the most recently opened post, so you can navigate out and back in while preserving the state, but if you navigate to another post, everything will reset.
  • I implemented this for both the new and old post pages.

Issue Being Fixed

Issue Number: #742, #1113

Screenshots / Recordings

(Too big for GitHub)

https://files.catbox.moe/p01rwn.mp4

Checklist

  • If a new package was added, did you ensure it uses an appropriate license and is actively maintained?
  • Did you use localized strings (and added appropriate descriptions) where applicable?
  • Did you add semanticLabels where applicable for accessibility?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant