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>
This commit is contained in:
William Casarin 2024-08-27 13:50:38 +03:00
parent 4ff30304e1
commit 54526a8f55

View File

@ -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