From c64ce58653171c7722e2ec5d4dd022451cc7e8d1 Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Thu, 24 Oct 2019 20:36:20 +0300 Subject: [PATCH] ui/accounts: show totals in account tab --- ui/src/components/mail/accounts.rs | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/ui/src/components/mail/accounts.rs b/ui/src/components/mail/accounts.rs index d68eb74f..9f93a0f9 100644 --- a/ui/src/components/mail/accounts.rs +++ b/ui/src/components/mail/accounts.rs @@ -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, - ); } } }