mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-27 11:09:20 +03:00
Message thread optimization
This commit is contained in:
parent
0c145a054a
commit
a4904f4c00
7 changed files with 140 additions and 53 deletions
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
var
|
||||
_ = require('_'),
|
||||
ko = require('ko'),
|
||||
|
||||
Utils = require('Common/Utils'),
|
||||
|
||||
|
|
@ -20,11 +21,18 @@
|
|||
function MessageSimpleModel(sSuperName)
|
||||
{
|
||||
AbstractModel.call(this, sSuperName || 'MessageSimpleModel');
|
||||
|
||||
this.flagged = ko.observable(false);
|
||||
this.selected = ko.observable(false);
|
||||
}
|
||||
|
||||
_.extend(MessageSimpleModel.prototype, AbstractModel.prototype);
|
||||
|
||||
MessageSimpleModel.prototype.__simple_message__ = true;
|
||||
|
||||
MessageSimpleModel.prototype.folder = '';
|
||||
MessageSimpleModel.prototype.folderFullNameRaw = '';
|
||||
|
||||
MessageSimpleModel.prototype.uid = '';
|
||||
MessageSimpleModel.prototype.subject = '';
|
||||
|
||||
|
|
@ -48,6 +56,8 @@
|
|||
MessageSimpleModel.prototype.clear = function ()
|
||||
{
|
||||
this.folder = '';
|
||||
this.folderFullNameRaw = '';
|
||||
|
||||
this.uid = '';
|
||||
|
||||
this.subject = '';
|
||||
|
|
@ -68,6 +78,9 @@
|
|||
|
||||
this.size = 0;
|
||||
this.timestamp = 0;
|
||||
|
||||
this.flagged(false);
|
||||
this.selected(false);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -81,6 +94,8 @@
|
|||
if (oJson && 'Object/Message' === oJson['@Object'])
|
||||
{
|
||||
this.folder = Utils.pString(oJson.Folder);
|
||||
this.folderFullNameRaw = this.folder;
|
||||
|
||||
this.uid = Utils.pString(oJson.Uid);
|
||||
|
||||
this.subject = Utils.pString(oJson.Subject);
|
||||
|
|
@ -112,6 +127,9 @@
|
|||
this.toAsString = MessageHelper.emailArrayToString(this.to, true);
|
||||
this.toAsStringClear = MessageHelper.emailArrayToStringClear(this.to);
|
||||
|
||||
this.flagged(false);
|
||||
this.selected(false);
|
||||
|
||||
this.populateSenderEmail();
|
||||
|
||||
bResult = true;
|
||||
|
|
@ -132,6 +150,14 @@
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {Array}
|
||||
*/
|
||||
MessageSimpleModel.prototype.threads = function ()
|
||||
{
|
||||
return [];
|
||||
};
|
||||
|
||||
/**
|
||||
* @static
|
||||
* @param {Object} oJson
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue