ui/accounts: show totals in account tab

embed
Manos Pitsidianakis 2019-10-24 20:36:20 +03:00
parent ab531f0294
commit c64ce58653
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
1 changed files with 4 additions and 21 deletions

View File

@ -276,18 +276,10 @@ impl AccountsPanel {
self.content[(2, h + y + 1)].set_ch(' ');
}
}
let (x, _) = write_string_to_grid(
"- Settings",
&mut self.content,
Color::Default,
Color::Default,
Attr::Default,
((5, y + 3), (120 - 2, y + 3)),
true,
);
write_string_to_grid(
&format!(
"total {}",
"Messages total {}, unseen {}",
a.collection.len(),
a.collection
.envelopes
.values()
@ -298,11 +290,11 @@ impl AccountsPanel {
Color::Default,
Color::Default,
Attr::Default,
((10 + x, y + 3), (120 - 2, y + 3)),
((5, y + 3), (120 - 2, y + 3)),
true,
);
write_string_to_grid(
"- Contacts",
&format!("Contacts total {}", a.address_book.len()),
&mut self.content,
Color::Default,
Color::Default,
@ -310,15 +302,6 @@ impl AccountsPanel {
((5, y + 4), (120 - 2, y + 4)),
true,
);
write_string_to_grid(
"- Mailing Lists",
&mut self.content,
Color::Default,
Color::Default,
Attr::Default,
((5, y + 5), (120 - 2, y + 5)),
true,
);
}
}
}