feat: Enhance account handling and message delivery status updates; improve UI feedback for saved messages

This commit is contained in:
k1ngsterr1
2026-01-18 18:12:45 +05:00
parent 61995e9286
commit b8aba7714c
4 changed files with 87 additions and 81 deletions

View File

@@ -368,6 +368,9 @@ class MessageRepository private constructor(private val context: Context) {
// Обновляем кэш
val dialogKey = getDialogKey(packet.toPublicKey)
updateMessageStatus(dialogKey, packet.messageId, DeliveryStatus.DELIVERED)
// 🔥 КРИТИЧНО: Обновляем диалог чтобы lastMessageDelivered обновился
dialogDao.updateDialogFromMessages(account, packet.toPublicKey)
}
/**
@@ -389,6 +392,9 @@ class MessageRepository private constructor(private val context: Context) {
else msg
}
}
// 🔥 КРИТИЧНО: Обновляем диалог чтобы lastMessageRead обновился
dialogDao.updateDialogFromMessages(account, packet.fromPublicKey)
}
/**