Исправлены ложные галочки и синхронизация статусов сообщений

This commit is contained in:
2026-03-20 19:20:06 +05:00
parent 9afbbae5c9
commit b85c553507
6 changed files with 270 additions and 62 deletions

View File

@@ -400,10 +400,13 @@ interface MessageDao {
@Query(
"""
UPDATE messages SET read = 1
WHERE account = :account AND to_public_key = :opponent AND from_me = 1
WHERE account = :account
AND to_public_key = :opponent
AND from_me = 1
AND delivered IN (1, 3)
"""
)
suspend fun markAllAsRead(account: String, opponent: String)
suspend fun markAllAsRead(account: String, opponent: String): Int
/** 🔥 DEBUG: Получить последнее сообщение в диалоге для отладки */
@Query(