get correct count only from one of the active users elements

v1.18.x
barisusakli 10 years ago
parent fec84821b7
commit 3ba4d2aa2b

@ -23,7 +23,7 @@ define('forum/topic/browsing', function() {
Browsing.onUserEnter = function(data) {
var activeEl = $('.thread_active_users');
var user = activeEl.find('a[data-uid="' + data.uid + '"]');
if (!user.length && activeEl.children().length < 10) {
if (!user.length && activeEl.first().children().length < 10) {
addUserIcon(data);
} else if (user.length) {
user.attr('data-count', parseInt(user.attr('data-count'), 10) + 1);

Loading…
Cancel
Save