(js) Restrict special mailboxes to the top level

Fixes #6963
This commit is contained in:
Francis Lachapelle committed 2017-03-22 14:53:07 -04:00
1 parent e7a06c42a4
commit 75aaef0f3d
3 files changed
+15 -4

No files matched your search

@@ -571,6 +571,16 @@
});
};
/**
* @function $canFolderAs
* @memberof Mailbox.prototype
* @desc Check if the folder can be set as Drafts/Sent/Trash
* @returns true if folder is eligible
*/
Mailbox.prototype.$canFolderAs = function() {
return this.type == 'folder' && this.level === 0;
};
/**
* @function $setFolderAs
* @memberof Mailbox.prototype