added a call to check for new notifications on load

v1.18.x
Julian Lam 12 years ago
parent 79bf5fad5b
commit 7321088ac5

@ -107,7 +107,6 @@
} }
}) })
socket.on('api:notifications.get', function(data) { socket.on('api:notifications.get', function(data) {
console.log(data);
var notifFrag = document.createDocumentFragment(), var notifFrag = document.createDocumentFragment(),
notifEl = document.createElement('li'), notifEl = document.createElement('li'),
numRead = data.read.length, numRead = data.read.length,
@ -138,6 +137,7 @@
if ((counts.unread + counts.read) > 0) notifIcon.className = 'icon-circle active'; if ((counts.unread + counts.read) > 0) notifIcon.className = 'icon-circle active';
else notifIcon.className = 'icon-circle-blank'; else notifIcon.className = 'icon-circle-blank';
}); });
socket.emit('api:notifications.counts');
}()); }());
</script> </script>
<!-- END Forum Info --> <!-- END Forum Info -->

Loading…
Cancel
Save