notedeck

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

commit 93b7af1a4e0dc8f69420d84425aef7ef26a3cf8b
parent c30fc44df07968a0c321380b340357052e26179f
Author: William Casarin <jb55@jb55.com>
Date:   Thu, 23 May 2024 11:06:22 -0700

perf: fix continuous repaint

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Msrc/app.rs | 16++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/app.rs b/src/app.rs @@ -275,14 +275,14 @@ fn poll_notes_for_timeline<'a>( let new_items = timeline.notes.len() - prev_items; // TODO: technically items could have been added inbetween - timeline - .list - .clone() - .lock() - .unwrap() - .items_inserted_at_start(new_items); - - ctx.request_repaint(); + if new_items > 0 { + timeline + .list + .clone() + .lock() + .unwrap() + .items_inserted_at_start(new_items); + } Ok(()) }