|
|
|
@ -75,20 +75,6 @@ define('forum/footer', ['notifications', 'chat', 'components', 'translator'], fu
|
|
|
|
|
socket.on('event:new_post', onNewPost);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DEPRECATED: remove in 1.8.0
|
|
|
|
|
if (app.user.uid) {
|
|
|
|
|
socket.emit('user.getUnreadCounts', function (err, data) {
|
|
|
|
|
if (err) {
|
|
|
|
|
return app.alert(err.message);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
updateUnreadCounters(data);
|
|
|
|
|
|
|
|
|
|
updateUnreadChatCount(data.unreadChatCount);
|
|
|
|
|
Notifications.updateNotifCount(data.unreadNotificationCount);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function updateUnreadCounters(data) {
|
|
|
|
|
updateUnreadTopicCount('/unread', data.unreadTopicCount);
|
|
|
|
|
updateUnreadTopicCount('/unread/new', data.unreadNewTopicCount);
|
|
|
|
|