наверное работает

This commit is contained in:
AidarKC
2026-04-21 01:04:05 +03:00
parent 2d48ae7a16
commit 185ba5b1d3
12 changed files with 186 additions and 34 deletions
+3 -7
View File
@@ -508,17 +508,13 @@ function toListModel(groups) {
function renderEmptyState(activeTab, navigate) {
const wrap = document.createElement('div');
wrap.className = 'channels-empty-state';
const icon = document.createElement('div');
icon.className = 'channels-empty-icon';
icon.textContent = '◌';
wrap.className = 'channels-empty-state channels-empty-state--compact';
const text = document.createElement('div');
text.className = 'meta-muted';
text.textContent = 'В этом разделе пока нет каналов';
text.textContent = 'В этом разделе нет сообщений';
wrap.append(icon, text);
wrap.append(text);
if (activeTab === 'my') {
const cta = document.createElement('button');
+10 -5
View File
@@ -7,6 +7,7 @@ import {
getChatMessages,
markChatRead,
markOutgoingSent,
markReadReceiptSentByBaseKey,
authService,
state,
} from '../state.js';
@@ -33,10 +34,10 @@ function renderLog(list, chatId) {
messages.forEach((msg) => {
if (!unreadSeparatorInserted && msg?.from === 'in' && msg?.unread) {
const sep = document.createElement('div');
sep.className = 'meta-muted';
sep.style.textAlign = 'center';
sep.style.margin = '8px 0';
sep.textContent = 'Новые сообщения';
sep.className = 'chat-unread-separator';
const label = document.createElement('span');
label.textContent = 'Новые сообщения';
sep.append(label);
list.append(sep);
unreadSeparatorInserted = true;
}
@@ -216,7 +217,11 @@ async function sendReadReceiptsForVisible(chatId) {
refNonce: ref.nonce,
refType: 1,
});
row.readReceiptSent = true;
if (row.baseKey) {
markReadReceiptSentByBaseKey(row.baseKey);
} else {
row.readReceiptSent = true;
}
} catch (e) {
addAppLogEntry({
level: 'warn',
+1
View File
@@ -12,6 +12,7 @@ export function render({ navigate }) {
screen.append(
renderHeader({
title: 'Личные сообщения',
leftLabel: String(state.session.login || '').trim(),
rightActions: [{ label: '+', onClick: () => navigate('contact-search-view') }],
}),
);