From 9ba786df4c7ebbc0f47f5f60a1b7ac129faf154c Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 6 Feb 2020 18:32:05 +0100 Subject: [PATCH] Fix avatar in notification history --- www/notifications/inner.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/www/notifications/inner.js b/www/notifications/inner.js index 2e89c5078..0cc4ad87e 100644 --- a/www/notifications/inner.js +++ b/www/notifications/inner.js @@ -101,7 +101,11 @@ define([ var time = new Date(data.content.time); $(el).find(".cp-notification-content").append(h("span.notification-time", time.toLocaleString())); $(el).addClass("cp-app-notification-archived"); - $(el).toggle(!isDataUnread); + if (isDataUnread) { + $(el).hide(); + } else { + $(el).css('display', 'flex'); + } $(notifsList).append(el); } }; @@ -140,7 +144,7 @@ define([ addNotification(data, el); }, onViewed: function (data) { - $('.cp-app-notification-archived[data-hash="' + data.hash + '"]').show(); + $('.cp-app-notification-archived[data-hash="' + data.hash + '"]').css('display', 'flex'); } });