Оптимизация приложения
This commit is contained in:
@@ -456,6 +456,7 @@ class GroupRepository private constructor(context: Context) {
|
||||
messageId = UUID.randomUUID().toString().replace("-", "").take(32),
|
||||
plainMessage = encryptedPlainMessage,
|
||||
attachments = "[]",
|
||||
primaryAttachmentType = -1,
|
||||
dialogKey = dialogPublicKey
|
||||
)
|
||||
)
|
||||
|
||||
@@ -207,6 +207,7 @@ class MessageRepository private constructor(private val context: Context) {
|
||||
messageId = messageId,
|
||||
plainMessage = encryptedPlainMessage,
|
||||
attachments = "[]",
|
||||
primaryAttachmentType = -1,
|
||||
dialogKey = dialogKey
|
||||
)
|
||||
)
|
||||
@@ -266,6 +267,7 @@ class MessageRepository private constructor(private val context: Context) {
|
||||
messageId = messageId,
|
||||
plainMessage = encryptedPlainMessage,
|
||||
attachments = "[]",
|
||||
primaryAttachmentType = -1,
|
||||
dialogKey = dialogKey
|
||||
)
|
||||
)
|
||||
@@ -528,6 +530,8 @@ class MessageRepository private constructor(private val context: Context) {
|
||||
messageId = messageId,
|
||||
plainMessage = encryptedPlainMessage, // 🔒 Зашифрованный текст
|
||||
attachments = attachmentsJson,
|
||||
primaryAttachmentType =
|
||||
resolvePrimaryAttachmentType(attachments),
|
||||
replyToMessageId = replyToMessageId,
|
||||
dialogKey = dialogKey
|
||||
)
|
||||
@@ -860,6 +864,8 @@ class MessageRepository private constructor(private val context: Context) {
|
||||
messageId = messageId, // 🔥 Используем сгенерированный messageId!
|
||||
plainMessage = encryptedPlainMessage, // 🔒 Зашифрованный текст
|
||||
attachments = attachmentsJson,
|
||||
primaryAttachmentType =
|
||||
resolvePrimaryAttachmentType(packet.attachments),
|
||||
dialogKey = dialogKey
|
||||
)
|
||||
|
||||
@@ -1638,6 +1644,11 @@ class MessageRepository private constructor(private val context: Context) {
|
||||
return jsonArray.toString()
|
||||
}
|
||||
|
||||
private fun resolvePrimaryAttachmentType(attachments: List<MessageAttachment>): Int {
|
||||
if (attachments.isEmpty()) return -1
|
||||
return attachments.first().type.value
|
||||
}
|
||||
|
||||
/**
|
||||
* 📸 Обработка AVATAR attachments - сохранение аватара отправителя в кэш Как в desktop: при
|
||||
* получении attachment с типом AVATAR - сохраняем в avatar_cache
|
||||
|
||||
@@ -17,10 +17,11 @@ object ReleaseNotes {
|
||||
val RELEASE_NOTICE = """
|
||||
Update v$VERSION_PLACEHOLDER
|
||||
|
||||
Защищенные звонки и диагностика E2EE
|
||||
- Обновлен custom WebRTC для Android и исправлена совместимость аудио E2EE с Desktop
|
||||
- Улучшены diagnostics для шифрования звонков (детализация ENC/DEC в crash reports)
|
||||
- В Crash Reports добавлена кнопка копирования полного лога одним действием
|
||||
Оптимизация E2EE и списка чатов
|
||||
- В release отключена frame-диагностика E2EE (детальные frame-логи только в debug)
|
||||
- Упрощен ChatsListScreen: убрано дублирование collectAsState и вынесены route-компоненты
|
||||
- Ускорены выборки по вложениям: добавлен denormalized attachment type + индекс в БД
|
||||
- Добавлена миграция БД с backfill типа вложения для старых сообщений
|
||||
""".trimIndent()
|
||||
|
||||
fun getNotice(version: String): String =
|
||||
|
||||
Reference in New Issue
Block a user