Xyphyn / photon

An opinionated web client for Lemmy to help users discover the fediverse.
https://phtn.app
GNU Affero General Public License v3.0
389 stars 43 forks source link

Unsorted/unfiltered content flashing on loading page #398

Closed mastazi closed 3 months ago

mastazi commented 3 months ago

Describe the bug In the settings, I have set "Default sort" options to

Whenever I load the home page, for a couple of seconds I see the home page filtered by

then if flashes back to the expected contents.

To Reproduce (if applicable) Steps to reproduce the behavior:

  1. Go to options, set "Default sort" to anything other than
    1. Location: All
    2. Sort: Active
  2. go back to home page and refresh
  3. observe content flashing, for 1-2 seconds you will see content that is not filtered according to your desired settings, then it will revert back to the expected view.

Expected behavior The contents that are visible in home page should be sorted/filtered according to the user's settings.

Screenshots N/A

Versions

Xyphyn commented 3 months ago

Are you using Lemmy on p.lemmy.world? If so, that's because they have SSR enabled and I can't physically fix this without either having users trust me with their credentials, or having some access to the database.

mastazi commented 3 months ago

Yes, I am on p.lemmy.world. Maybe you could use localStorage for things like sorting settings and dark/light theme?

Xyphyn commented 3 months ago

localStorage is local, meaning the server cannot access it when it fetches posts initially.

mastazi commented 3 months ago

Oh I see, you're right. I'm closing this.