improving the unread messages counter badge

This commit is contained in:
tibbi 2020-07-27 22:37:11 +02:00
parent f511f35df0
commit 2e0d6a877d
6 changed files with 18 additions and 22 deletions

View file

@ -14,6 +14,9 @@ interface ConversationsDao {
@Query("SELECT * FROM conversations")
fun getAll(): List<Conversation>
@Query("SELECT * FROM conversations WHERE read = 0")
fun getUnreadConversations(): List<Conversation>
@Query("UPDATE conversations SET read = 1 WHERE thread_id = :threadId")
fun markRead(threadId: Long)