diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-09-25 22:00:30 +0300 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-09-26 13:10:06 +0300 |
commit | 9305e543cf04ee2e53c989d2f29a6ea0b57092c4 (patch) | |
tree | 9b59f34505b0825ae6e8d003a190a8f3c30aac72 /ui/src/components/mail/view | |
parent | 5a53020f3d2d7819c5c24871d2dd126c5a2ec84c (diff) |
melib: add a `body` field to Attachment
Attachment needs to know the range of bytes where the body part of the
attachment is located. The Attachment.raw field contains the entire
attachment, headers and body. The new Attachment.body fields contains a
`StrBuilder` which contains the offset and length of the body part inside
`raw`.
Diffstat (limited to 'ui/src/components/mail/view')
-rw-r--r-- | ui/src/components/mail/view/envelope.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/src/components/mail/view/envelope.rs b/ui/src/components/mail/view/envelope.rs index a9cfd626..d6fd8146 100644 --- a/ui/src/components/mail/view/envelope.rs +++ b/ui/src/components/mail/view/envelope.rs @@ -150,7 +150,7 @@ impl EnvelopeView { } t } - ViewMode::Raw => String::from_utf8_lossy(body.raw()).into_owned(), + ViewMode::Raw => String::from_utf8_lossy(body.body()).into_owned(), ViewMode::Url => { let mut t = body_text.to_string(); for (lidx, l) in finder.links(&body.text()).enumerate() { |