server: fix counting issue w/ notmuch (messages vs threads)

This commit is contained in:
Bill Thiede 2024-08-18 14:18:15 -07:00
parent 3edf9fdb5d
commit 8769e5acd4

View File

@ -518,7 +518,7 @@ impl Notmuch {
}
pub fn count(&self, query: &str) -> Result<usize, NotmuchError> {
let res = self.run_notmuch(["count", query])?;
let res = self.run_notmuch(["count", "--output=threads", query])?;
// Strip '\n' from res.
let s = std::str::from_utf8(&res[..res.len() - 1])?;
Ok(s.parse()?)