notedeck

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

commit 6dee4bbe7de5c71dd62946102d5545a4a02ee7d6
parent b8357d840be0b9c042cfd4534c00fc7b7c463f43
Author: William Casarin <jb55@jb55.com>
Date:   Sun, 24 Dec 2023 14:22:19 -0800

timeline: add new notes at the start

still need proper insert logic based on created date

Diffstat:
Msrc/app.rs | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/app.rs b/src/app.rs @@ -202,7 +202,7 @@ fn process_event(damus: &mut Damus, _subid: &str, event: Event) { let cloned_id = event.id.clone(); damus.all_events.insert(cloned_id.clone(), event); - damus.events.push(cloned_id); + damus.events.insert(0, cloned_id); } fn get_unknown_author_ids(damus: &Damus) -> Vec<Pubkey> { @@ -526,6 +526,8 @@ fn render_panel(ctx: &egui::Context, app: &mut Damus) { app.frame_history.fps(), app.frame_history.mean_frame_time() * 1e3 )); + + ui.label(format!("{} notes", app.events.len())); }); }); }