From 8f914786e0165f707bb501626ae96ec3abf188de Mon Sep 17 00:00:00 2001 From: ClemDee Date: Thu, 27 Jun 2019 14:00:00 +0200 Subject: [PATCH] Fasten notification element removal in list --- www/notifications/app-notifications.less | 3 +++ www/notifications/inner.js | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/www/notifications/app-notifications.less b/www/notifications/app-notifications.less index b8b2c1f67..df6efcd62 100644 --- a/www/notifications/app-notifications.less +++ b/www/notifications/app-notifications.less @@ -89,6 +89,9 @@ &:not(:first-child) { border-top: 1px solid #ccc; } + &.dismissed { + display: none; + } .cp-notification-content { flex-grow: 1; diff --git a/www/notifications/inner.js b/www/notifications/inner.js index d75293ce3..c305352e9 100644 --- a/www/notifications/inner.js +++ b/www/notifications/inner.js @@ -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); }