feat: Add VerifiedBadge and online status to user profile header

This commit is contained in:
k1ngsterr1
2026-01-25 18:43:40 +05:00
parent efd666ee41
commit 37acbfeef6
3 changed files with 74 additions and 14 deletions

View File

@@ -478,6 +478,22 @@ interface DialogDao {
""")
suspend fun updateOnlineStatus(account: String, opponentKey: String, isOnline: Int, lastSeen: Long)
/**
* Получить онлайн статус пользователя
*/
@Query("""
SELECT is_online, last_seen
FROM dialogs
WHERE account = :account AND opponent_key = :opponentKey
LIMIT 1
""")
fun observeOnlineStatus(account: String, opponentKey: String): Flow<OnlineStatusInfo?>
data class OnlineStatusInfo(
@ColumnInfo(name = "is_online") val isOnline: Int,
@ColumnInfo(name = "last_seen") val lastSeen: Long
)
/**
* Удалить диалог
*/