mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-27 19:19:21 +03:00
Folder list optimization
This commit is contained in:
parent
61a7a9c078
commit
547324f8d1
15 changed files with 113 additions and 99 deletions
|
|
@ -12,16 +12,11 @@ function FolderModel()
|
|||
this.delimiter = '';
|
||||
this.namespace = '';
|
||||
this.deep = 0;
|
||||
this.interval = 0;
|
||||
|
||||
this.selectable = false;
|
||||
this.existen = true;
|
||||
|
||||
this.isNamespaceFolder = false;
|
||||
this.isGmailFolder = false;
|
||||
this.isUnpaddigFolder = false;
|
||||
|
||||
this.interval = 0;
|
||||
|
||||
this.type = ko.observable(Enums.FolderType.User);
|
||||
|
||||
this.focused = ko.observable(false);
|
||||
|
|
@ -70,7 +65,7 @@ FolderModel.prototype.initComputed = function ()
|
|||
{
|
||||
this.hasSubScribedSubfolders = ko.computed(function () {
|
||||
return !!_.find(this.subFolders(), function (oFolder) {
|
||||
return oFolder.subScribed();
|
||||
return oFolder.subScribed() && !oFolder.isSystemFolder();
|
||||
});
|
||||
}, this);
|
||||
|
||||
|
|
@ -97,7 +92,8 @@ FolderModel.prototype.initComputed = function ()
|
|||
bSubFolders = this.hasSubScribedSubfolders()
|
||||
;
|
||||
|
||||
return this.isGmailFolder || (bSystem && this.isNamespaceFolder) || (bSystem && !bSubFolders);
|
||||
return (bSystem && !bSubFolders) || (!this.selectable && !bSubFolders);
|
||||
|
||||
}, this);
|
||||
|
||||
this.selectableForFolderList = ko.computed(function () {
|
||||
|
|
@ -292,10 +288,6 @@ FolderModel.prototype.namespace = '';
|
|||
FolderModel.prototype.deep = 0;
|
||||
FolderModel.prototype.interval = 0;
|
||||
|
||||
FolderModel.prototype.isNamespaceFolder = false;
|
||||
FolderModel.prototype.isGmailFolder = false;
|
||||
FolderModel.prototype.isUnpaddigFolder = false;
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue