mirror of
https://github.com/RainLoop/rainloop-webmail.git
synced 2026-02-05 11:34:54 +01:00
Update openpgpjs library
Small changes
This commit is contained in:
@@ -19,8 +19,12 @@ function MessageModel()
|
||||
this.proxy = false;
|
||||
|
||||
this.fromEmailString = ko.observable('');
|
||||
this.fromClearEmailString = ko.observable('');
|
||||
this.toEmailsString = ko.observable('');
|
||||
this.toClearEmailsString = ko.observable('');
|
||||
|
||||
this.senderEmailsString = ko.observable('');
|
||||
this.senderClearEmailsString = ko.observable('');
|
||||
|
||||
this.emails = [];
|
||||
|
||||
@@ -165,10 +169,37 @@ MessageModel.emailsToLine = function (aEmail, bFriendlyView, bWrapWithLink)
|
||||
return aResult.join(', ');
|
||||
};
|
||||
|
||||
/**
|
||||
* @static
|
||||
* @param {Array} aEmail
|
||||
* @return {string}
|
||||
*/
|
||||
MessageModel.emailsToLineClear = function (aEmail)
|
||||
{
|
||||
var
|
||||
aResult = [],
|
||||
iIndex = 0,
|
||||
iLen = 0
|
||||
;
|
||||
|
||||
if (Utils.isNonEmptyArray(aEmail))
|
||||
{
|
||||
for (iIndex = 0, iLen = aEmail.length; iIndex < iLen; iIndex++)
|
||||
{
|
||||
if (aEmail[iIndex] && aEmail[iIndex].email && '' !== aEmail[iIndex].name)
|
||||
{
|
||||
aResult.push(aEmail[iIndex].email);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return aResult.join(', ');
|
||||
};
|
||||
|
||||
/**
|
||||
* @static
|
||||
* @param {?Array} aJsonEmails
|
||||
* @return {Array}
|
||||
* @return {Array.<EmailModel>}
|
||||
*/
|
||||
MessageModel.initEmailsFromJson = function (aJsonEmails)
|
||||
{
|
||||
@@ -236,8 +267,11 @@ MessageModel.prototype.clear = function ()
|
||||
this.proxy = false;
|
||||
|
||||
this.fromEmailString('');
|
||||
this.fromClearEmailString('');
|
||||
this.toEmailsString('');
|
||||
this.toClearEmailsString('');
|
||||
this.senderEmailsString('');
|
||||
this.senderClearEmailsString('');
|
||||
|
||||
this.emails = [];
|
||||
|
||||
@@ -298,6 +332,9 @@ MessageModel.prototype.computeSenderEmail = function ()
|
||||
|
||||
this.senderEmailsString(this.folderFullNameRaw === sSent || this.folderFullNameRaw === sDraft ?
|
||||
this.toEmailsString() : this.fromEmailString());
|
||||
|
||||
this.senderClearEmailsString(this.folderFullNameRaw === sSent || this.folderFullNameRaw === sDraft ?
|
||||
this.toClearEmailsString() : this.fromClearEmailString());
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -342,7 +379,9 @@ MessageModel.prototype.initByJson = function (oJsonMessage)
|
||||
this.attachmentsMainType(oJsonMessage.AttachmentsMainType);
|
||||
|
||||
this.fromEmailString(MessageModel.emailsToLine(this.from, true));
|
||||
this.fromClearEmailString(MessageModel.emailsToLineClear(this.from));
|
||||
this.toEmailsString(MessageModel.emailsToLine(this.to, true));
|
||||
this.toClearEmailsString(MessageModel.emailsToLineClear(this.to));
|
||||
|
||||
this.parentUid(Utils.pInt(oJsonMessage.ParentThread));
|
||||
this.threads(Utils.isArray(oJsonMessage.Threads) ? oJsonMessage.Threads : []);
|
||||
@@ -830,7 +869,9 @@ MessageModel.prototype.populateByMessageListItem = function (oMessage)
|
||||
this.proxy = oMessage.proxy;
|
||||
|
||||
this.fromEmailString(oMessage.fromEmailString());
|
||||
this.fromClearEmailString(oMessage.fromClearEmailString());
|
||||
this.toEmailsString(oMessage.toEmailsString());
|
||||
this.toClearEmailsString(oMessage.toClearEmailsString());
|
||||
|
||||
this.emails = oMessage.emails;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user