fixed module.js callback format

This commit is contained in:
Julian Lam
2014-01-16 20:14:09 -05:00
parent cbb630fd6b
commit bc48ba874d
4 changed files with 31 additions and 40 deletions

View File

@@ -51,13 +51,15 @@ define(function() {
notifIcon.toggleClass('active', false);
}
socket.emit('modules.notifications.mark_all_read', null, function() {
notifIcon.toggleClass('active', false);
app.refreshTitle();
socket.emit('modules.notifications.mark_all_read', null, function(err) {
if (!err) {
notifIcon.toggleClass('active', false);
app.refreshTitle();
// Update favicon + local count
Tinycon.setBubble(0);
localStorage.setItem('notifications:count', 0);
// Update favicon + local count
Tinycon.setBubble(0);
localStorage.setItem('notifications:count', 0);
}
});
});
}