mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-14 17:56:16 +01:00
fixed active users icon in thread
This commit is contained in:
@@ -632,13 +632,8 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
|
||||
'event:topic.replyStart', 'event:topic.replyStop'
|
||||
]);
|
||||
|
||||
socket.on('get_users_in_room', function(data) {
|
||||
|
||||
if(data && data.room.indexOf('topic') !== -1) {
|
||||
var activeEl = $('.thread_active_users');
|
||||
|
||||
function createUserIcon(uid, picture, userslug, username) {
|
||||
if(!activeEl.find('[data-uid="' + uid + '"]').length) {
|
||||
if(!$('.thread_active_users').find('[data-uid="' + uid + '"]').length) {
|
||||
var div = $('<div class="inline-block"><a data-uid="' + uid + '" href="' + RELATIVE_PATH + '/user/' + userslug + '"><img src="'+ picture +'"/></a></div>');
|
||||
div.find('a').tooltip({
|
||||
placement: 'top',
|
||||
@@ -649,6 +644,10 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
|
||||
}
|
||||
}
|
||||
|
||||
socket.on('get_users_in_room', function(data) {
|
||||
if(data && data.room.indexOf('topic') !== -1) {
|
||||
var activeEl = $('.thread_active_users');
|
||||
|
||||
// remove users that are no longer here
|
||||
activeEl.find('a').each(function(index, element) {
|
||||
if(element) {
|
||||
|
||||
Reference in New Issue
Block a user