Make sure to clean up the duplicated class

This commit is contained in:
Hadi Nategh 2020-08-05 16:43:57 +02:00
parent 6b3747d225
commit e3cf9b7aa5

View File

@ -500,6 +500,7 @@ app.classes.mail = AppJS.extend(
case 'label3':
case 'label4':
case 'label5':
case 'flagged':
if (unset)
{
this.mail_removeRowClass(msg, flag);
@ -3473,7 +3474,11 @@ app.classes.mail = AppJS.extend(
classes = classes.split(' ');
if(classes.indexOf(_class) >= 0)
{
classes.splice(classes.indexOf(_class),1);
for(var c in classes)
{
classes.splice(classes.indexOf(_class),1);
if (classes.indexOf(_class) < 0) break;
}
dataElem.data['class'] = classes.join(' ');
// need to update flags too