chat: вызывать chatInit после HTMX-перехода
Без этого список каналов зависал на «Загрузка…» при открытии чата из меню. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -306,8 +306,12 @@ function chatLoadChannels() {
|
||||
chatLoadLastActivity(); // уточнюємо порядок за реальним часом останніх постів
|
||||
}).catch(function (e) {
|
||||
console.error(e);
|
||||
var msg = '<div style="padding:1rem; text-align:center; font-size:0.8125rem; color:var(--color-destructive);">'
|
||||
+ gettext('Не удалось загрузить каналы') + '</div>';
|
||||
var el = document.getElementById('chat-channel-list');
|
||||
if (el) el.innerHTML = '<div style="padding:1rem; text-align:center; font-size:0.8125rem; color:var(--color-destructive);">' + gettext('Не удалось загрузить каналы') + '</div>';
|
||||
if (el) el.innerHTML = msg;
|
||||
var dm = document.getElementById('chat-dm-list');
|
||||
if (dm) dm.innerHTML = msg;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user