diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-07-23 15:20:38 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-07-23 15:20:38 +0200 |
commit | 2da40ccfcdf581721a2f087755a0875a833e2311 (patch) | |
tree | b82dd534fe58ee7d8e72d7e552e4277c628e5477 /src | |
parent | 9536af1e296be52f6da4f5b22ee66ae965058b55 (diff) |
Fix: Do not read mailfile, but only store mail id here
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src')
-rw-r--r-- | src/maillist_view.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/maillist_view.rs b/src/maillist_view.rs index b955b1f..dd50910 100644 --- a/src/maillist_view.rs +++ b/src/maillist_view.rs @@ -27,7 +27,7 @@ impl MaillistView { .search_messages()? .map(|msg| { Ok(MailListingData { - mail: crate::mail::UnparsedMail::read_from_path(msg.id().to_string(), msg.filename())?, + mail_id: msg.id().to_string(), tags: msg.tags().collect(), date: chrono::naive::NaiveDateTime::from_timestamp_opt(msg.date(), 0) .ok_or_else(|| anyhow!("Failed to parse timestamp: {}", msg.date()))? @@ -53,7 +53,7 @@ impl MaillistView { let mail_id = siv.call_on_name(&name, move |table: &mut ResizedView<TableView<MailListingData, MailListingColumn>>| { table.get_inner_mut() .borrow_item(row) - .map(|data| data.mail.id().clone()) + .map(|data| data.mail_id.clone()) }); // use the mail ID to get the whole thread and open it as a table item @@ -125,7 +125,7 @@ pub enum MailListingColumn { #[derive(Clone, Debug)] pub struct MailListingData { - mail: crate::mail::UnparsedMail, + mail_id: String, tags: Vec<String>, date: String, from: String, |