fixed code v2

This commit is contained in:
SlimusMinus
2026-08-12 00:38:04 +03:00
parent fe3c91446a
commit e45c9326ed
19 changed files with 233 additions and 124 deletions

View File

@@ -15,3 +15,13 @@ export function cachePostsFromChats(chats) {
}
}
}
/** Удаляет запись при удалении конкретного чата. */
export function removePostForChat(chatId) {
postByChatId.delete(chatId);
}
/** Полностью очищает кеш — вызывать при logout(), чтобы не хранить данные предыдущей сессии. */
export function clearPostCache() {
postByChatId.clear();
}