Xyphyn / photon

A replacement for lemmy-ui with more features, a better design, and more customizability.
https://phtn.app
GNU Affero General Public License v3.0
348 stars 39 forks source link

Unsorted/unfiltered content flashing on loading page #398

Closed mastazi closed 1 month ago

mastazi commented 1 month 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 1 month 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 1 month ago

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

Xyphyn commented 1 month ago

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

mastazi commented 1 month ago

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