add "from" name to mail table

This commit is contained in:
Michael Zhang 2021-03-09 05:59:43 -06:00
parent daa3b8cd61
commit d898e2a07e
Signed by: michael
GPG key ID: BDA47A31A3C8EE6B
2 changed files with 7 additions and 4 deletions

View file

@ -84,8 +84,8 @@ impl MailTabState {
.widths(&[ .widths(&[
Constraint::Length(1), Constraint::Length(1),
Constraint::Max(3), Constraint::Max(3),
Constraint::Min(25),
Constraint::Min(20), Constraint::Min(20),
Constraint::Min(35),
Constraint::Max(5000), Constraint::Max(5000),
]) ])
.header( .header(

View file

@ -116,9 +116,12 @@ pub async fn run_ui(
AttributeValue::Envelope(Envelope { AttributeValue::Envelope(Envelope {
subject: new_subject, from: new_from, .. subject: new_subject, from: new_from, ..
}) => { }) => {
// if let Some(new_from) = new_from { if let Some(new_from) = new_from {
// from = new_from; from = new_from.iter()
// } .filter_map(|addr| addr.name.to_owned())
.collect::<Vec<_>>()
.join(", ");
}
if let Some(new_subject) = new_subject { if let Some(new_subject) = new_subject {
subject = new_subject; subject = new_subject;
} }