Исправить UI статусы DM

This commit is contained in:
AidarKC
2026-07-10 11:57:00 +04:00
parent bb92cb6b2b
commit 2b23aa7b95
4 changed files with 39 additions and 6 deletions
+6 -1
View File
@@ -577,6 +577,7 @@ export function markOutgoingReadByBaseKey(baseKey) {
} else {
state.pendingOutgoingReadByBaseKey[baseKey] = true;
}
return matched;
}
export function markIncomingReadByBaseKey(baseKey) {
@@ -600,6 +601,7 @@ export function markIncomingReadByBaseKey(baseKey) {
} else {
state.pendingIncomingReadByBaseKey[baseKey] = true;
}
return matched;
}
export function markReadReceiptSentByBaseKey(baseKey) {
@@ -727,12 +729,15 @@ export function deleteConversationMessagesBefore(chatId, boundaryTimeMs) {
export function markChatRead(chatId) {
const normalizedChatId = normalizeDmChatId(chatId);
const list = getChatMessages(normalizedChatId);
let changed = 0;
list.forEach((row) => {
if (row?.from === 'in') {
if (row?.from === 'in' && row?.unread) {
row.unread = false;
persistMessageRecord(normalizedChatId, row);
changed += 1;
}
});
return changed;
}
export function setContacts(list) {