Micro fixes

embed
Manos Pitsidianakis 2018-07-22 12:42:50 +03:00
parent a7993d48f8
commit f267fe8c9e
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
3 changed files with 5 additions and 5 deletions

View File

@ -266,8 +266,8 @@ named!(pub subject<String>, ws!(do_parse!(
let list_len = list.len();
let mut i = 0;
list.iter().fold(String::with_capacity(string_len),
|acc, x| {
let mut acc = acc + &x.replace("\n", "");
|acc, x| {
let mut acc = acc + &x.replace("\n", "").replace("\t", " ");
if i != list_len - 1 {
acc.push_str(" ");
i+=1;

View File

@ -85,7 +85,7 @@ fn main() {
let menu = Entity {component: Box::new(AccountMenu::new(&state.context.accounts)) };
let listing = MailListing::new();
let b = Entity { component: Box::new(listing) };
let window = Entity { component: Box::new(VSplit::new(menu, b, 80)) };
let window = Entity { component: Box::new(VSplit::new(menu, b, 90)) };
let status_bar = Entity { component: Box::new(StatusBar::new(window)) };
state.register_entity(status_bar);

View File

@ -23,7 +23,7 @@ pub struct AccountMenu {
impl AccountMenu {
pub fn new(accounts: &Vec<Account>) -> Self {
let accounts = accounts.iter().enumerate().map(|(i, a)| {
let accounts = accounts.iter().enumerate().map(|(i, a)| {
AccountMenuEntry {
name: a.name().to_string(),
index: i,
@ -158,7 +158,7 @@ impl Component for AccountMenu {
let upper_left = upper_left!(area);
let bottom_right = bottom_right!(area);
self.dirty = false;
let mut y = get_y(upper_left) + 1;
let mut y = get_y(upper_left);
for a in &self.accounts {
y += self.print_account(grid,
(set_y(upper_left, y), bottom_right),