From 9a908c165108824fc21afea92bd33c0297ce22da Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 4 Sep 2014 17:49:30 -0400 Subject: [PATCH] filter users who are already on dom --- public/src/forum/users.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/src/forum/users.js b/public/src/forum/users.js index 4df2b9c5be..cdf1ab9e73 100644 --- a/public/src/forum/users.js +++ b/public/src/forum/users.js @@ -74,6 +74,10 @@ define('forum/users', function() { } function onUsersLoaded(users) { + users = users.filter(function(user) { + return !$('.users-box[data-uid="' + user.uid + '"]').length; + }); + ajaxify.loadTemplate('users', function(usersTemplate) { var html = templates.parse(templates.getBlock(usersTemplate, 'users'), {users: users});