server: fix paging if only notmuch results are found

This commit is contained in:
2024-08-15 14:58:23 -07:00
parent 8a237bf8e1
commit b5e25eef78
3 changed files with 17 additions and 2 deletions

View File

@@ -217,7 +217,10 @@ impl QueryRoot {
let newsreader_query: Query = query.parse()?;
Ok(newsreader::count(pool, &newsreader_query).await? + nm::count(nm, &query).await?)
let newsreader_count = newsreader::count(pool, &newsreader_query).await?;
let notmuch_count = nm::count(nm, &newsreader_query.to_notmuch()).await?;
info!("count {newsreader_query:?} newsreader count {newsreader_count} notmuch count {notmuch_count}");
Ok(newsreader_count + notmuch_count)
}
async fn search<'ctx>(