perf: fix continuous repaint
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
16
src/app.rs
16
src/app.rs
@@ -275,14 +275,14 @@ fn poll_notes_for_timeline<'a>(
|
|||||||
let new_items = timeline.notes.len() - prev_items;
|
let new_items = timeline.notes.len() - prev_items;
|
||||||
|
|
||||||
// TODO: technically items could have been added inbetween
|
// TODO: technically items could have been added inbetween
|
||||||
timeline
|
if new_items > 0 {
|
||||||
.list
|
timeline
|
||||||
.clone()
|
.list
|
||||||
.lock()
|
.clone()
|
||||||
.unwrap()
|
.lock()
|
||||||
.items_inserted_at_start(new_items);
|
.unwrap()
|
||||||
|
.items_inserted_at_start(new_items);
|
||||||
ctx.request_repaint();
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user