diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-09-07 22:07:13 +0300 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-09-08 11:13:51 +0300 |
commit | a866e060a1d837d59a87a519e3df17bfbfa7a951 (patch) | |
tree | 4d6c4a3c1cb0aeb1cf6b5e2e8c4b616460262078 /ui/src/components/mail/view.rs | |
parent | f72fb069fa1c7eaaa7928f92bba2bb06f989d454 (diff) |
ui: open MessageRfc822 attachments in new tab
Diffstat (limited to 'ui/src/components/mail/view.rs')
-rw-r--r-- | ui/src/components/mail/view.rs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/ui/src/components/mail/view.rs b/ui/src/components/mail/view.rs index aa3f04cc..0e7a24be 100644 --- a/ui/src/components/mail/view.rs +++ b/ui/src/components/mail/view.rs @@ -731,15 +731,16 @@ impl Component for MailView { if let Some(u) = envelope.body(op).attachments().get(lidx) { match u.content_type() { ContentType::MessageRfc822 => { - self.mode = ViewMode::Subview; match EnvelopeWrapper::new(u.raw().to_vec()) { Ok(wrapper) => { - self.subview = Some(Box::new(EnvelopeView::new( - wrapper, - None, - None, - self.coordinates.0, - ))); + context.replies.push_back(UIEvent::Action(Tab(New(Some( + Box::new(EnvelopeView::new( + wrapper, + None, + None, + self.coordinates.0, + )), + ))))); } Err(e) => { context.replies.push_back(UIEvent::StatusEvent( |