fix: #11797, update title on chat switch

isekai-main
Barış Soner Uşaklı 2 years ago
parent ac063fe58a
commit 840792ae35

@ -229,6 +229,7 @@ ajaxify.widgets = { render: render };
}); });
}); });
} }
ajaxify.updateTitle = updateTitle;
function updateTags() { function updateTags() {
const metaWhitelist = ['title', 'description', /og:.+/, /article:.+/, 'robots'].map(function (val) { const metaWhitelist = ['title', 'description', /og:.+/, /article:.+/, 'robots'].map(function (val) {

@ -464,6 +464,7 @@ define('forum/chats', [
chatNavWrapper = $('[component="chat/nav-wrapper"]'); chatNavWrapper = $('[component="chat/nav-wrapper"]');
html.find('.timeago').timeago(); html.find('.timeago').timeago();
ajaxify.data = { ...ajaxify.data, ...payload, roomId: roomId }; ajaxify.data = { ...ajaxify.data, ...payload, roomId: roomId };
ajaxify.updateTitle(ajaxify.data.title);
$('body').toggleClass('chat-loaded', !!roomId); $('body').toggleClass('chat-loaded', !!roomId);
mainWrapper.find('[data-bs-toggle="tooltip"]').tooltip(); mainWrapper.find('[data-bs-toggle="tooltip"]').tooltip();
Chats.setActive(roomId); Chats.setActive(roomId);

Loading…
Cancel
Save