Fasten notification element removal in list

This commit is contained in:
ClemDee
2019-06-27 14:00:00 +02:00
parent 19a3524ab5
commit 8f914786e0
2 changed files with 8 additions and 0 deletions

View File

@@ -77,6 +77,11 @@ define([
if (el) {
// if the type of notification correspond
if (filterTypes.length === 0 || filterTypes.indexOf(data.content.msg.type) !== -1) {
var dismissHandler = data.content.dismissHandler;
data.content.dismissHandler = function () {
$(el).addClass("dismissed");
dismissHandler();
};
notifsData.push(data);
$(notifsList).prepend(el);
}