mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-06 04:21:17 +01:00
remove deprecated code
unread counts are loaded on cold load
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user