server: fix paging bug where p1->p2->p1 wouldn't show consistent results

This commit is contained in:
2024-08-06 21:15:10 -07:00
parent 474cf38180
commit 7c5ef96ff0
3 changed files with 9 additions and 12 deletions

View File

@@ -302,10 +302,7 @@ impl QueryRoot {
if let Some(last) = last {
if results.len() > last {
has_previous_page = true;
// TODO: find better way to do this.
results.reverse();
results.truncate(last);
results.reverse();
}
}
@@ -325,10 +322,6 @@ impl QueryRoot {
notmuch_offset = offset;
}
}
info!(
"item: {} {}",
thread_summary.subject, thread_summary.timestamp
);
let cur = OpaqueCursor(SearchCursor {
newsreader_offset,
notmuch_offset,