mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 12:05:57 +01:00
added API call for total unread topics; moved unread notification parsing to client side
also fixed a bug where the new notification icon glow would disappear on page refresh even if there were existing notifications.
This commit is contained in:
@@ -127,6 +127,15 @@ marked.setOptions({
|
||||
});
|
||||
}
|
||||
|
||||
Topics.getTotalUnread = function(uid, callback) {
|
||||
RDB.zcount('topics:recent', '-inf', '+inf', function(err, count) {
|
||||
if (err) count = 0;
|
||||
console.log(count);
|
||||
|
||||
callback(count);
|
||||
});
|
||||
};
|
||||
|
||||
Topics.getUnreadTopics = function(uid, start, stop, callback) {
|
||||
|
||||
var unreadTopics = {
|
||||
|
||||
Reference in New Issue
Block a user