mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-09 22:20:48 +01:00
when new notification comes in, refresh notification page - closes #608
This commit is contained in:
@@ -67,6 +67,7 @@
|
||||
notifTrigger = notifContainer.querySelector('a'),
|
||||
notifList = document.getElementById('notif-list'),
|
||||
notifIcon = $('.notifications a');
|
||||
|
||||
notifTrigger.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
if (notifContainer.className.indexOf('open') === -1) {
|
||||
@@ -169,6 +170,10 @@
|
||||
});
|
||||
app.refreshTitle();
|
||||
|
||||
if (ajaxify.currentPage === 'notifications') {
|
||||
ajaxify.refresh();
|
||||
}
|
||||
|
||||
// Update the favicon + local storage
|
||||
var savedCount = parseInt(localStorage.getItem('notifications:count'),10) || 0;
|
||||
localStorage.setItem('notifications:count', savedCount+1);
|
||||
|
||||
Reference in New Issue
Block a user