server: reenable per-account unread counts

This commit is contained in:
Bill Thiede 2025-04-15 19:33:32 -07:00
parent cffc228b3a
commit 60e2824167

View File

@ -135,25 +135,23 @@ pub fn tags(nm: &Notmuch, needs_unread: bool) -> Result<Vec<Tag>, ServerError> {
unread, unread,
} }
}) })
/* .chain(
.chain( nm.unread_recipients()?
nm.unread_recipients()? .into_iter()
.into_iter() .filter_map(|(name, unread)| {
.filter_map(|(name, unread)| { let Some(idx) = name.find('@') else {
let Some(idx) = name.find('@') else { return None;
return None; };
}; let name = format!("{}/{}", &name[idx..], &name[..idx]);
let name = format!("{}/{}", &name[idx..], &name[..idx]); let bg_color = compute_color(&name);
let bg_color = compute_color(&name); Some(Tag {
Some(Tag { name,
name, fg_color: "white".to_string(),
fg_color: "white".to_string(), bg_color,
bg_color, unread,
unread, })
}) }),
}), )
)
*/
.collect(); .collect();
Ok(tags) Ok(tags)
} }