mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Resolve #1332
This commit is contained in:
parent
638755bef3
commit
2916583d0b
6 changed files with 28 additions and 26 deletions
|
|
@ -10,7 +10,7 @@ import {
|
|||
FolderType,
|
||||
MessageSetAction
|
||||
} from 'Common/EnumsUser';
|
||||
|
||||
import { RFC822 } from 'Common/File';
|
||||
import {
|
||||
elementById,
|
||||
keyScopeReal,
|
||||
|
|
@ -292,7 +292,19 @@ export class MailMessageView extends AbstractViewRight {
|
|||
return;
|
||||
}
|
||||
|
||||
if (eqs(event, '.attachmentsPlace .showPreview')) {
|
||||
el = eqs(event, '.attachmentsPlace .showPreview');
|
||||
if (el) {
|
||||
const attachment = ko.dataFor(el), url = attachment?.linkDownload();
|
||||
// if (url && FileType.Eml === attachment.fileType) {
|
||||
if (url && RFC822 == attachment.mimeType) {
|
||||
stopEvent(event);
|
||||
fetchRaw(url).then(text => {
|
||||
const oMessage = new MessageModel();
|
||||
MimeToMessage(text, oMessage);
|
||||
// cleanHTML
|
||||
oMessage.popupMessage();
|
||||
});
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -326,14 +338,6 @@ export class MailMessageView extends AbstractViewRight {
|
|||
fetchRaw(url).then(text =>
|
||||
showScreenPopup(OpenPgpImportPopupView, [text])
|
||||
);
|
||||
} else if ('message/rfc822' == attachment.mimeType) {
|
||||
// TODO
|
||||
fetchRaw(url).then(text => {
|
||||
const oMessage = new MessageModel();
|
||||
MimeToMessage(text, oMessage);
|
||||
// cleanHTML
|
||||
oMessage.popupMessage();
|
||||
});
|
||||
} else {
|
||||
download(url, attachment.fileName);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue