mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
feat: Add "Mark all as read" and unread message count indicators (#4720)
This commit is contained in:
parent
6a1a612c38
commit
b0258d0cf1
10 changed files with 131 additions and 26 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue