this post was submitted on 25 Mar 2025
6 points (100.0% liked)
Photon
456 readers
4 users here now
Photon for Lemmy
A client for the fediverse designed to be intuitive, fast, and beautiful.
Share your themes, ask questions, report bugs, or check on the latest updates here!
You can contact the dev at @Xylight@lemdro.id.
Rules
- Posts must be related to Photon in any way
- Don't be mean
- If your post is a bug report, please preface the title with
[solved]
if it's been fixed.
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I don’t use Photon, but I glanced at the source code and it looks like they are also using Tanstack Virtual, which my Lemmy client uses. My app is in beta an doesn’t have many users, but I think I solved this feed issue.
You need to do a few things:
You have to recalculate initalOffset when returning to the list, NOT when you are scrolling through the list. If you try to calculate it while scrolling the feed, you will drift a few posts upwards/downwards. Using initial item + offset yields a much more stable result.
It’s all pretty messy, but take a look at my spaghetti code.