Связи - интересно но надо дорабатывать

This commit is contained in:
AidarKC
2026-09-10 14:52:20 +03:00
parent d83f1d4cce
commit 849250bfa8
9 changed files with 613 additions and 131 deletions
+3 -6
View File
@@ -1615,12 +1615,9 @@ export function render({ navigate, route, chrome }) {
const handleIncomingChatRefresh = async (event) => {
const updatedChatId = normalizeDmChatId(event?.detail?.chatId);
if (updatedChatId !== chatId) return;
if (Number(event?.detail?.messageType || 0) === 1) {
if (!unreadSeparatorVisible) {
unreadSeparatorAnchorMessageKey = getChatMessages(chatId).find((msg) => msg?.from === 'in' && msg?.unread)?.messageKey || unreadSeparatorAnchorMessageKey;
unreadSeparatorVisible = Boolean(unreadSeparatorAnchorMessageKey);
}
}
// Если диалог уже открыт, новое входящее сразу показывается в текущем потоке и не создаёт
// новый визуальный разделитель «Новые сообщения». Такой разделитель относится только к
// непрочитанным, которые существовали ДО открытия экрана чата.
preserveComposerSelection(input, () => {
renderChatLog({ scrollMode: 'latest' });
});