summaryrefslogtreecommitdiffstats
path: root/ui/src/components/mail/listing
diff options
context:
space:
mode:
authorManos Pitsidianakis <el13635@mail.ntua.gr>2018-08-13 09:25:48 +0300
committerManos Pitsidianakis <el13635@mail.ntua.gr>2019-06-10 19:40:28 +0300
commit5d0b7fa903a127064816389b83a433e42803cb61 (patch)
treede1963a1e8d16cd1937738ee88ad687834147539 /ui/src/components/mail/listing
parent5889494e9e4d6c51aa87e6433f2dfdbfb8b4846a (diff)
Add Envelope parsing caching
Concerns #28
Diffstat (limited to 'ui/src/components/mail/listing')
-rw-r--r--ui/src/components/mail/listing/mod.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/ui/src/components/mail/listing/mod.rs b/ui/src/components/mail/listing/mod.rs
index 21863ac6..611de7ab 100644
--- a/ui/src/components/mail/listing/mod.rs
+++ b/ui/src/components/mail/listing/mod.rs
@@ -21,7 +21,7 @@
use super::*;
-use melib::mailbox::backends::BackendOp;
+//use melib::mailbox::backends::BackendOp;
mod compact;
pub use self::compact::*;
@@ -220,7 +220,7 @@ impl MailListing {
container,
&indentations,
len,
- context.accounts[self.cursor_pos.0].backend.operation(envelope.hash())
+ // context.accounts[self.cursor_pos.0].backend.operation(envelope.hash())
),
&mut content,
fg_color,
@@ -421,7 +421,7 @@ impl MailListing {
container: &Container,
indentations: &[bool],
idx_width: usize,
- op: Box<BackendOp>,
+ //op: Box<BackendOp>,
) -> String {
let has_sibling = container.has_sibling();
let has_parent = container.has_parent();
@@ -458,10 +458,13 @@ impl MailListing {
if show_subject {
s.push_str(&format!("{:.85}", envelope.subject()));
}
+ /*
+ * Very slow since we have to build all attachments
let attach_count = envelope.body(op).count_attachments();
if attach_count > 1 {
s.push_str(&format!(" {}∞ ", attach_count - 1));
}
+ */
s
}
fn format_date(envelope: &Envelope) -> String {