damus-io / notedeck

A multiplatform nostr client
Other
47 stars 9 forks source link

egui-virtual-list jumpy in some scenarios #94

Open jb55 opened 1 month ago

jb55 commented 1 month ago

I think what's happening is that egui-virtual-list's method of inserting list items at the top of the list doesn't quite work for us. Sometimes items can get spliced into the timeline at random locations. This causes the internal state of egui-virtual-list to get confused, which I believe is causing jumpiness.

We must also consider the case where notes with embedded content gets resized, like images, previews, and note references. If these note sizes get cached and then they are later resized, then our overall position will be wrong.

virtual-list has a reset method which is a fairly large hammer we can swing for these scenarios?