chat: вызывать chatInit после HTMX-перехода

Без этого список каналов зависал на «Загрузка…» при открытии чата из меню.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-22 12:45:34 +03:00
parent a2fe4a49e3
commit fe463c11af
2 changed files with 10 additions and 1 deletions
+5 -1
View File
@@ -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;
});
}