From da94d6214bea71f1134520e51178eb0102f60d56 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Sat, 7 Dec 2013 16:42:17 -0500 Subject: [PATCH] when new notification comes in, refresh notification page - closes #608 --- public/src/forum/footer.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/src/forum/footer.js b/public/src/forum/footer.js index 046a7e8186..cb2cff3e79 100644 --- a/public/src/forum/footer.js +++ b/public/src/forum/footer.js @@ -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);