fix(mail(web)): improve identification of mailboxes

This commit is contained in:
Francis Lachapelle
2021-10-22 14:34:45 -04:00
parent 33535d3d79
commit 7c7df9b47c
3 changed files with 37 additions and 3 deletions
@@ -204,8 +204,17 @@
this.$icon = 'thumb_down';
}
else if (this.type == 'additional') {
this.$icon = 'folder';
}
else if (this.type == 'shared') {
this.$icon = 'folder_shared';
}
else if (this.type == 'otherUsers') {
this.$icon = 'folder_shared';
}
else if (this.type == 'dropbox') {
this.$icon = 'drive_folder_upload';
}
else {
this.$isSpecial = false;
this.$icon = 'folder';
@@ -514,6 +523,16 @@
return this.flags.indexOf('noselect') >= 0;
};
/**
* @function isWritable
* @memberof Mailbox.prototype
* @desc Checks the user can write to the mailbox
* @returns true if messages can be inserted
*/
Mailbox.prototype.isWritable = function() {
return this.flags.indexOf('noselect') < 0 || this.type == 'dropbox';
};
/**
* @function getClassName
* @memberof Mailbox.prototype
@@ -271,7 +271,7 @@
}; // delegate
this.isDroppableFolder = function(srcFolder, dstFolder) {
return (dstFolder.id != srcFolder.id) && !dstFolder.isNoSelect();
return (dstFolder.id != srcFolder.id) && dstFolder.isWritable();
};
this.dragSelectedMessages = function(srcFolder, dstFolder, mode) {