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

Homepage showing 'All' posts when 'Local' is selected #1053

Closed
ruudschilders opened this issue Jun 2, 2023 · 4 comments
Closed

Homepage showing 'All' posts when 'Local' is selected #1053

ruudschilders opened this issue Jun 2, 2023 · 4 comments

Comments

@ruudschilders
Copy link

I have 0.17.3 installed. (https://lemmy.world)
When I login, I am redirected to the homepage. It shows 'Local' posts are selected, but I see 'All' posts.
When I click 'All' and then back to 'Local' , it does show Local posts only.

Also when going back from another page, like Communities, to the homepage I see this behaviour.
I don't see it when not logged in.

@ruudschilders
Copy link
Author

Update: Apparently this only happens when in user settings, 'Type' is set to 'All'
I am guessing that's the default I would want on the homepage.
So explains why I see All. But then the 'All' should be highlighted, not the 'Local'

@exadeci
Copy link

exadeci commented Jun 5, 2023

Tried it on lemmy.ml and it doesn't have your issue however when I select "All" for "Type" in Settings it shows me the "Local" tab by default on the homepage and it's filtered properly

@dessalines
Copy link
Member

Verified. Might be a while until I can get to this one.

@fheft
Copy link
Contributor

fheft commented Jun 10, 2023

I think this is already fixed and will be released with v0.18, although I can't verify it (having trouble running the latest main locally).

In v0.17 there was a weak conditional operator that erroneously handled the setting 'show All posts' (value 0) as if there was no setting at all (value undefined) – see utils.ts#L739:

myLt    // will be 0 if the user has selected 'All' in their settings
    ? Object.values(ListingType)[myLt]
    : defaultListingType;

This code was refactored a few weeks ago and the error should no longer occur. See home.tsx#L115.

Will test once 0.18 is released/fully working.

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

No branches or pull requests

5 participants