diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-05-12 15:10:08 +0300 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-06-10 19:40:48 +0300 |
commit | a0b1a079b83bf7ca755e1a32535801ace2c60b98 (patch) | |
tree | 333b275200e3f81f596b1e6e9827b851a2598aa0 /ui/src/components/mail | |
parent | 4c88422d71d60265e05cd41d9034387d15f4d546 (diff) |
ui: add "application/pgp-signature" content type
Diffstat (limited to 'ui/src/components/mail')
-rw-r--r-- | ui/src/components/mail/view.rs | 11 | ||||
-rw-r--r-- | ui/src/components/mail/view/envelope.rs | 8 |
2 files changed, 18 insertions, 1 deletions
diff --git a/ui/src/components/mail/view.rs b/ui/src/components/mail/view.rs index 1b3ae398..1ac321ae 100644 --- a/ui/src/components/mail/view.rs +++ b/ui/src/components/mail/view.rs @@ -200,13 +200,14 @@ impl MailView { match self.mode { ViewMode::Normal | ViewMode::Subview => { let mut t = body_text.to_string(); + t.push('\n'); if body.count_attachments() > 1 { t = body .attachments() .iter() .enumerate() .fold(t, |mut s, (idx, a)| { - s.push_str(&format!("[{}] {}\n\n", idx, a)); + s.push_str(&format!("\n[{}] {}\n", idx, a)); s }); } @@ -660,6 +661,14 @@ impl Component for MailView { return true; } } + ContentType::PGPSignature => { + context.replies.push_back(UIEvent::StatusEvent( + StatusEvent::DisplayMessage( + "Signatures aren't supported yet".to_string(), + ), + )); + return true; + } } } else { context.replies.push_back(UIEvent::StatusEvent( diff --git a/ui/src/components/mail/view/envelope.rs b/ui/src/components/mail/view/envelope.rs index f888b33e..62467196 100644 --- a/ui/src/components/mail/view/envelope.rs +++ b/ui/src/components/mail/view/envelope.rs @@ -459,6 +459,14 @@ impl Component for EnvelopeView { return true; } } + ContentType::PGPSignature => { + context.replies.push_back(UIEvent::StatusEvent( + StatusEvent::DisplayMessage( + "Signatures aren't supported yet".to_string(), + ), + )); + return true; + } } } else { context.replies.push_back(UIEvent::StatusEvent( |