feat: Add message count query to MessageDao, enhance ChatDetailScreen with auto-focus on reply input, and improve read receipt handling in ChatViewModel
This commit is contained in:
@@ -145,6 +145,15 @@ interface MessageDao {
|
||||
""")
|
||||
fun getMessagesFlow(account: String, dialogKey: String): Flow<List<MessageEntity>>
|
||||
|
||||
/**
|
||||
* Получить количество сообщений в диалоге
|
||||
*/
|
||||
@Query("""
|
||||
SELECT COUNT(*) FROM messages
|
||||
WHERE account = :account AND dialog_key = :dialogKey
|
||||
""")
|
||||
suspend fun getMessageCount(account: String, dialogKey: String): Int
|
||||
|
||||
/**
|
||||
* Получить последние N сообщений диалога
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user