lemmy-ui
lemmy-ui copied to clipboard
Homepage showing 'All' posts when 'Local' is selected
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.
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'
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
Verified. Might be a while until I can get to this one.
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.