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

fixed sort resetting when navigating back from a post #755

Merged
merged 1 commit into from
Nov 11, 2023

Conversation

EricBAndrews
Copy link
Member

@EricBAndrews EricBAndrews commented Nov 10, 2023

Checklist

Pull Request Information

This PR fixes the community reloading when navigating back from a post. It introduces a state variable to track whether the site information has loaded. Posts are now not displayed until site information has loaded to avoid a jarring redraw if the sort type is updated, and the sort type uses this variable to ensure it only updates the sort information the first time site information loads.

@EricBAndrews EricBAndrews requested a review from a team as a code owner November 10, 2023 20:37
@EricBAndrews EricBAndrews requested review from JakeShirley and mormaer and removed request for a team November 10, 2023 20:37
@boscojwho
Copy link
Contributor

What's the repro for this? I tried the following on the latest /dev build:
A (steps from #750)

  1. Tap into post in Feed.
  2. Go back.
  3. Nothing reloads (Expected reload to move list back to top).

B.

  1. Tap into post in Feed.
  2. Go to Settings, and change Sorting Posts option.
  3. Go back to Feeds tab.
  4. Go back to Feed list.
  5. Nothing reloads (Expected reload to move list back to top).

@EricBAndrews
Copy link
Member Author

EricBAndrews commented Nov 11, 2023

Repro steps (produces bug behavior on build 749):

  • go to feed
  • change feed sort to anything other than default using menu in nav bar
  • tap post
  • navigate back, and the sort should revert to default and reload the feed

Copy link
Contributor

@Sjmarf Sjmarf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@EricBAndrews EricBAndrews enabled auto-merge (squash) November 11, 2023 20:26
@EricBAndrews EricBAndrews merged commit e29b179 into dev Nov 11, 2023
4 checks passed
@EricBAndrews EricBAndrews deleted the eric/sort-reset-fix branch November 11, 2023 20:35
boscojwho pushed a commit that referenced this pull request Nov 23, 2023
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.

Community forgets navigation
3 participants