feat: Implement automatic keyboard hiding on screen exit for improved user experience

This commit is contained in:
k1ngsterr1
2026-01-13 21:07:07 +05:00
parent f155c4d36d
commit 912412bd56
8 changed files with 467 additions and 344 deletions

View File

@@ -333,4 +333,20 @@ interface DialogDao {
username: String,
verified: Int
)
/**
* Получить общее количество непрочитанных сообщений, исключая указанный диалог
* Используется для отображения badge на кнопке "назад" в экране чата
*/
@Query("""
SELECT COALESCE(SUM(unread_count), 0) FROM dialogs
WHERE account = :account AND opponent_key != :excludeOpponentKey
""")
fun getTotalUnreadCountExcludingFlow(account: String, excludeOpponentKey: String): Flow<Int>
/**
* Получить общее количество непрочитанных сообщений
*/
@Query("SELECT COALESCE(SUM(unread_count), 0) FROM dialogs WHERE account = :account")
fun getTotalUnreadCountFlow(account: String): Flow<Int>
}