From e3cf9b7aa51203b813225c7a49b20b74f0b5b451 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Wed, 5 Aug 2020 16:43:57 +0200 Subject: [PATCH] Make sure to clean up the duplicated class --- mail/js/app.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mail/js/app.js b/mail/js/app.js index a19bda8746..b8b81d742a 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -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