From 5de78cef213659d4c03733ade977bf291717d5ab Mon Sep 17 00:00:00 2001 From: William Casarin Date: Fri, 30 Aug 2024 10:44:37 -0700 Subject: [PATCH] docs: fix comment in the wrong spot Signed-off-by: William Casarin --- src/app.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/app.rs b/src/app.rs index 2ff5485b..598be86b 100644 --- a/src/app.rs +++ b/src/app.rs @@ -92,15 +92,11 @@ fn relay_setup(pool: &mut RelayPool, ctx: &egui::Context) { } } -/// Should we since optimize? Not always. For examplem if we only have a few -/// notes locally. One way to determine this is by looking at the current filter -/// and seeing what its limit is. If we have less notes than the limit, -/// we might want to backfill older notes fn send_initial_filters(damus: &mut Damus, relay_url: &str) { info!("Sending initial filters to {}", relay_url); let mut c: u32 = 1; - let can_since_optimize = damus.since_optimize; + for relay in &mut damus.pool.relays { let relay = &mut relay.relay; if relay.url == relay_url { @@ -124,6 +120,13 @@ fn send_initial_filters(damus: &mut Damus, relay_url: &str) { } let notes = timeline.notes(ViewFilter::NotesAndReplies); + + // Should we since optimize? Not always. For example + // if we only have a few notes locally. One way to + // determine this is by looking at the current filter + // and seeing what its limit is. If we have less + // notes than the limit, we might want to backfill + // older notes if can_since_optimize && crate::filter::should_since_optimize(lim, notes.len()) { filter = crate::filter::since_optimize_filter(filter, notes); } else {