server: make pagination slightly less bad

This commit is contained in:
Bill Thiede 2025-01-12 16:35:11 -08:00
parent de23bae8bd
commit 76482c6c15

View File

@ -422,10 +422,16 @@ impl QueryRoot {
} }
let mut connection = Connection::new(has_previous_page, has_next_page); let mut connection = Connection::new(has_previous_page, has_next_page);
let mut newsreader_offset = 0; let mut newsreader_offset =
let mut notmuch_offset = 0; after.as_ref().map(|sc| sc.newsreader_offset).unwrap_or(0);
let mut notmuch_offset = after.as_ref().map(|sc| sc.notmuch_offset).unwrap_or(0);
#[cfg(feature = "tantivy")] #[cfg(feature = "tantivy")]
let mut tantivy_offset = 0; let tantivy_offset = after.as_ref().map(|sc| sc.tantivy_offset).unwrap_or(0);
info!(
"newsreader_offset ({}) notmuch_offset ({})",
newsreader_offset, notmuch_offset,
);
connection.edges.extend(results.into_iter().map(|item| { connection.edges.extend(results.into_iter().map(|item| {
let thread_summary; let thread_summary;