feat: Add VerifiedBadge and online status to user profile header
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
/**
|
||||
* Удалить диалог
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user