feat: Optimize chat screen transitions by removing redundant animations for a smoother user experience
This commit is contained in:
@@ -410,6 +410,23 @@ class MessageRepository private constructor(private val context: Context) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Обновить онлайн-статус пользователя в диалоге
|
||||
*/
|
||||
suspend fun updateOnlineStatus(publicKey: String, isOnline: Boolean) {
|
||||
val account = currentAccount ?: return
|
||||
|
||||
// Обновляем статус в базе
|
||||
dialogDao.updateOnlineStatus(
|
||||
account = account,
|
||||
opponentKey = publicKey,
|
||||
isOnline = if (isOnline) 1 else 0,
|
||||
lastSeen = if (!isOnline) System.currentTimeMillis() else 0
|
||||
)
|
||||
|
||||
android.util.Log.d("MessageRepository", "🟢 Updated online status for ${publicKey.take(16)}... isOnline=$isOnline")
|
||||
}
|
||||
|
||||
// Extension functions
|
||||
private fun MessageEntity.toMessage(): Message {
|
||||
// 🔓 Расшифровываем plainMessage с использованием приватного ключа
|
||||
|
||||
Reference in New Issue
Block a user