notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit 54526a8f55c368cf1055cbd28637f42b8dd91809
parent 4ff30304e1460c0e3dad7e144609284276cdc068
Author: William Casarin <jb55@jb55.com>
Date:   Tue, 27 Aug 2024 13:50:38 +0300

log: track virtual list splices

These are caused when timeline note insertions are not at the top.
egui-virtual-list only has optimizations for that scenario.

Link: https://github.com/damus-io/notedeck/issues/94
Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Msrc/timeline.rs | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/timeline.rs b/src/timeline.rs @@ -234,7 +234,13 @@ impl TimelineTab { match merge_kind { // TODO: update egui_virtual_list to support spliced inserts - MergeKind::Spliced => list.reset(), + MergeKind::Spliced => { + debug!( + "spliced when inserting {} new notes, resetting virtual list", + new_refs.len() + ); + list.reset(); + } MergeKind::FrontInsert => { // only run this logic if we're reverse-chronological // reversed in this case means chronological, since the