From 5f229d81e9aaac0e0d82091d2d9089f5fb34bfe8 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 9 Feb 2018 14:06:59 +0100 Subject: use distinct in channel item query and minor notification cache improvement --- view/js/main.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'view/js') diff --git a/view/js/main.js b/view/js/main.js index 02b0f125c..4a2bae802 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -357,6 +357,7 @@ function closeMenu(theID) { function markRead(notifType) { $.get('ping?f=&markRead='+notifType); $('.' + notifType + '-button').hide(); + sessionStorage.removeItem(notifType + '_notifications_cache'); if(timer) clearTimeout(timer); timer = setTimeout(updateInit,2000); } @@ -436,6 +437,7 @@ function handleNotifications(data) { if(item == 0) { $('.' + index + '-button').fadeOut(); + sessionStorage.removeItem(index + '_notifications_cache'); } else { $('.' + index + '-button').fadeIn(); $('.' + index + '-update').html(item); -- cgit v1.2.3