diff --git a/melib/src/email/address.rs b/melib/src/email/address.rs index f9d82c37..9bfc1940 100644 --- a/melib/src/email/address.rs +++ b/melib/src/email/address.rs @@ -42,6 +42,12 @@ pub enum Address { } impl Address { + pub fn raw(&self) -> &[u8] { + match self { + Address::Mailbox(m) => m.raw.as_slice(), + Address::Group(g) => g.raw.as_slice(), + } + } pub fn get_display_name(&self) -> String { match self { Address::Mailbox(m) => m.display_name.display(&m.raw), diff --git a/ui/src/components/mail/listing/conversations.rs b/ui/src/components/mail/listing/conversations.rs index 37d27cd9..787b18b7 100644 --- a/ui/src/components/mail/listing/conversations.rs +++ b/ui/src/components/mail/listing/conversations.rs @@ -464,6 +464,7 @@ impl ConversationsListing { } pub(super) fn make_entry_string( e: &Envelope, + from: &Vec
, thread_node: &ThreadNode, is_snoozed: bool, ) -> EntryStrings { @@ -476,7 +477,7 @@ impl ConversationsListing { if e.has_attachments() { "📎" } else { "" }, if is_snoozed { "💤" } else { "" } )), - from: FromString(address_list!((e.from()) as comma_sep_list)), + from: FromString(address_list!((from) as comma_sep_list)), } } else { EntryStrings { @@ -487,7 +488,7 @@ impl ConversationsListing { if e.has_attachments() { "📎" } else { "" }, if is_snoozed { "💤" } else { "" } )), - from: FromString(address_list!((e.from()) as comma_sep_list)), + from: FromString(address_list!((from) as comma_sep_list)), } } } @@ -568,6 +569,10 @@ impl ConversationsListing { Box::new(self.filtered_selection.iter().map(|h| *h)) as Box