v1.18.x
Julian Lam 11 years ago
parent 5efc1e5de8
commit 442c543d27

@ -7,7 +7,8 @@ define(function() {
ajaxify.register_events([
'event:new_topic',
'event:new_post'
'event:new_post',
'api:topics.markAllRead'
]);
var newTopicCount = 0,

@ -72,6 +72,7 @@ SocketTopics.markAllRead = function(data, callback, sessionData) {
topics.markAllRead(sessionData.uid, function(err, success) {
if (!err && success) {
callback(true);
sessionData.server.sockets.in('uid_' + sessionData.uid).emit('event:unread.updateCount', 0);
} else {
callback(false);
}

Loading…
Cancel
Save