Merge viewPopupMessage() into popupMessage()

This commit is contained in:
the-djmaze 2023-12-01 23:00:39 +01:00
parent 004de4e48c
commit 7e30c50dfe
3 changed files with 8 additions and 12 deletions

View file

@ -248,7 +248,7 @@ setLayoutResizer = (source, sClientSideKeyName, mode) =>
viewMessage = (oMessage, popup) => {
if (popup) {
oMessage.viewPopupMessage();
oMessage.popupMessage();
} else {
MessageUserStore.error('');
let id = 'rl-msg-' + oMessage.hash,

View file

@ -343,7 +343,10 @@ export class MessageModel extends AbstractModel {
return this.viewBody(false);
}
viewPopupMessage(print) {
/**
* @param {boolean=} print = false
*/
popupMessage(print) {
const
timeStampInUTC = this.dateTimestamp() || 0,
ccLine = this.cc.toString(),
@ -371,18 +374,11 @@ export class MessageModel extends AbstractModel {
.replace('</body>', `<div id="attachments">${attachments}</div></body>`)
);
sdoc.close();
print && setTimeout(() => win.print(), 100);
}
/**
* @param {boolean=} print = false
*/
popupMessage() {
this.viewPopupMessage();
(true === print) && setTimeout(() => win.print(), 100);
}
printMessage() {
this.viewPopupMessage(true);
this.popupMessage(true);
}
/**

View file

@ -332,7 +332,7 @@ export class MailMessageView extends AbstractViewRight {
const oMessage = new MessageModel();
MimeToMessage(text, oMessage);
// cleanHTML
oMessage.viewPopupMessage();
oMessage.popupMessage();
});
} else {
download(url, attachment.fileName);