feat: Add "Mark all as read" and unread message count indicators (#4720)

This commit is contained in:
James Rich 2026-03-05 12:18:34 -06:00 committed by GitHub
parent 6a1a612c38
commit b0258d0cf1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 131 additions and 26 deletions

View file

@ -49,6 +49,9 @@ interface PacketRepository {
/** Returns the count of unread messages in a conversation. */
suspend fun getUnreadCount(contact: String): Int
/** Reactive flow of the unread message count in a conversation. */
fun getUnreadCountFlow(contact: String): Flow<Int>
/** Reactive flow of the UUID of the first unread message in a conversation. */
fun getFirstUnreadMessageUuid(contact: String): Flow<Long?>
@ -61,6 +64,9 @@ interface PacketRepository {
/** Clears the unread status for messages in a conversation up to the given timestamp. */
suspend fun clearUnreadCount(contact: String, timestamp: Long)
/** Clears the unread status for all messages across all conversations. */
suspend fun clearAllUnreadCounts()
/** Updates the identifier of the last read message in a conversation. */
suspend fun updateLastReadMessage(contact: String, messageUuid: Long, lastReadTimestamp: Long)