diff --git a/public/src/forum/topic.js b/public/src/forum/topic.js index 824ef1cfb8..424d12db2c 100644 --- a/public/src/forum/topic.js +++ b/public/src/forum/topic.js @@ -482,7 +482,21 @@ define(function() { adjust_rep(-1, data.pid, data.uid); }); - socket.on('event:new_post', createNewPosts); + socket.on('event:new_post', function(data) { + var posts = data.posts; + for (var p in posts) { + if (posts.hasOwnProperty(p)) { + var post = posts[p], + postcount = jQuery('.user_postcount_' + post.uid), + ptotal = parseInt(postcount.html(), 10); + + ptotal += 1; + postcount.html(ptotal); + } + } + + createNewPosts(data); + }); socket.on('event:topic_deleted', function(data) { if (data.tid === tid && data.status === 'ok') { diff --git a/public/templates/topic.tpl b/public/templates/topic.tpl index 7c21d1a849..a09ee029e5 100644 --- a/public/templates/topic.tpl +++ b/public/templates/topic.tpl @@ -109,7 +109,7 @@