mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 18:16:17 +01:00
* WIP * more unread work * faster teaser block handling if user doesn't have anyone blocked don't check * much faster filtering of blocked posts * add missing uid * add tidsByFilter to return * dont load all pids to find previous non-blocked teaser * fix unread filters they no longer use unread/new unread/watched etc they are query strings now * shorter nav item code * add unreplied to filters fix icons not clearing to 0 dont increment unread counters if there is a reply in a topic where you ignored the topic creator
This commit is contained in:
committed by
GitHub
parent
df4f5f6f27
commit
cf75c79611
@@ -261,12 +261,19 @@ SocketUser.getUnreadCounts = function (socket, data, callback) {
|
||||
return callback(null, {});
|
||||
}
|
||||
async.parallel({
|
||||
unreadTopicCount: async.apply(topics.getTotalUnread, socket.uid),
|
||||
unreadNewTopicCount: async.apply(topics.getTotalUnread, socket.uid, 'new'),
|
||||
unreadWatchedTopicCount: async.apply(topics.getTotalUnread, socket.uid, 'watched'),
|
||||
unreadCounts: async.apply(topics.getUnreadTids, { uid: socket.uid, count: true }),
|
||||
unreadChatCount: async.apply(messaging.getUnreadCount, socket.uid),
|
||||
unreadNotificationCount: async.apply(user.notifications.getUnreadCount, socket.uid),
|
||||
}, callback);
|
||||
}, function (err, results) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
results.unreadTopicCount = results.unreadCounts[''];
|
||||
results.unreadNewTopicCount = results.unreadCounts.new;
|
||||
results.unreadWatchedTopicCount = results.unreadCounts.watched;
|
||||
results.unreadUnrepliedTopicCount = results.unreadCounts.unreplied;
|
||||
callback(null, results);
|
||||
});
|
||||
};
|
||||
|
||||
SocketUser.invite = function (socket, email, callback) {
|
||||
|
||||
Reference in New Issue
Block a user