get rid of tooltips before refreshing list

isekai-main
Barış Soner Uşaklı 2 years ago
parent 6e2d49e405
commit 86dd04d5fd

@ -111,7 +111,7 @@ define('forum/chats/manage', [
listEl.find('li').text(await translator.translate('[[error:invalid-data]]'));
}
}
listEl.find('[data-bs-toggle="tooltip"]').tooltip('dispose');
listEl.html(await app.parseAndTranslate('partials/chats/manage-room-users', data));
listEl.find('[data-bs-toggle="tooltip"]').tooltip();
}

@ -44,6 +44,7 @@ define('forum/chats/user-list', ['api'], function (api) {
async function updateUserList(roomId, userListEl) {
if (ajaxify.data.template.chats && app.isFocused && userListEl.scrollTop() === 0 && !userListEl.hasClass('hidden')) {
const data = await api.get(`/chats/${roomId}/users`, { start: 0 });
userListEl.find('[data-bs-toggle="tooltip"]').tooltip('dispose');
userListEl.html(await app.parseAndTranslate('partials/chats/user-list', 'users', data));
userListEl.find('[data-bs-toggle="tooltip"]').tooltip();
}

Loading…
Cancel
Save