diff --git a/public/src/forum/unread.js b/public/src/forum/unread.js index 9829ca7a25..ac9b275a68 100644 --- a/public/src/forum/unread.js +++ b/public/src/forum/unread.js @@ -12,8 +12,17 @@ define(['forum/recent'], function(recent) { recent.watchForNewPosts(); $('#mark-allread-btn').on('click', function() { + function getUnreadTids() { + var tids = []; + $('#topics-container .category-item[data-tid]').each(function() { + tids.push($(this).attr('data-tid')); + }); + return tids; + } + var btn = $(this); - socket.emit('topics.markAllRead', function(err) { + + socket.emit('topics.markAllRead', getUnreadTids(), function(err) { if(err) { return app.alertError('There was an error marking topics read!'); } diff --git a/public/templates/unread.tpl b/public/templates/unread.tpl index c1aa0f87d1..58cd9eab1e 100644 --- a/public/templates/unread.tpl +++ b/public/templates/unread.tpl @@ -19,7 +19,7 @@