mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-08 22:18:28 +03:00
Code refactoring
This commit is contained in:
parent
ffde4f03a8
commit
b7709c8117
21 changed files with 291 additions and 192 deletions
|
|
@ -71,7 +71,7 @@
|
|||
};
|
||||
|
||||
/**
|
||||
* @param {AjaxJsonMessage} oJson
|
||||
* @param {Object} oJson
|
||||
* @return {boolean}
|
||||
*/
|
||||
MessageSimpleModel.prototype.initByJson = function (oJson)
|
||||
|
|
@ -85,14 +85,16 @@
|
|||
|
||||
this.subject = Utils.pString(oJson.Subject);
|
||||
|
||||
this.subjectPrefix = '';
|
||||
this.subjectSuffix = this.subject;
|
||||
|
||||
if (Utils.isArray(oJson.SubjectParts))
|
||||
{
|
||||
this.subjectPrefix = Utils.pString(oJson.SubjectParts[0]);
|
||||
this.subjectSuffix = Utils.pString(oJson.SubjectParts[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.subjectPrefix = '';
|
||||
this.subjectSuffix = this.subject;
|
||||
}
|
||||
|
||||
this.from = MessageHelper.emailArrayFromJson(oJson.From);
|
||||
this.to = MessageHelper.emailArrayFromJson(oJson.To);
|
||||
|
|
@ -132,7 +134,7 @@
|
|||
|
||||
/**
|
||||
* @static
|
||||
* @param {AjaxJsonMessage} oJson
|
||||
* @param {Object} oJson
|
||||
* @return {?MessageSimpleModel}
|
||||
*/
|
||||
MessageSimpleModel.newInstanceFromJson = function (oJson)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue