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

This commit is contained in:
James Rich authored and GitHub committed 2026-03-05 18:18:34 +00:00
1 parent 6a1a612c38
commit b0258d0cf1
10 files changed
+131 -26

No files matched your search

@@ -158,6 +158,26 @@ class PacketDaoTest {
}
}
@Test
fun test_getUnreadCount_excludesFiltered() = runBlocking {
val filteredContactKey = "0!filteredonly"
val filteredPacket =
Packet(
uuid = 0L,
myNodeNum = myNodeNum,
port_num = 1,
contact_key = filteredContactKey,
received_time = nowMillis,
read = false,
filtered = true,
data = DataPacket(DataPacket.ID_BROADCAST, 0, "Filtered message"),
)
packetDao.insert(filteredPacket)
val unreadCount = packetDao.getUnreadCount(filteredContactKey)
assertEquals(0, unreadCount)
}
@Test
fun test_clearUnreadCount() = runBlocking {
val timestamp = nowMillis