mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
refactor(notifications): share markConversationRead helper across receivers
Extract the 'clear unread count + cancel message notification' pair into a single suspend helper on MeshServiceNotifications so ReplyReceiver, MarkAsReadReceiver, and ReactionReceiver use one consistent code path. ReactionReceiver now also clears unread and cancels the notification once the reaction dispatch succeeds, matching the other receivers. Receivers that only depended on PacketRepository for this pair drop that injection. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
9c75f5a3f4
commit
6d70d154e6
8 changed files with 26 additions and 12 deletions
|
|
@ -67,6 +67,8 @@ class FakeMeshServiceNotifications : MeshServiceNotifications {
|
|||
|
||||
override fun cancelMessageNotification(contactKey: String) {}
|
||||
|
||||
override suspend fun markConversationRead(contactKey: String) {}
|
||||
|
||||
override fun cancelLowBatteryNotification(node: Node) {}
|
||||
|
||||
override fun clearClientNotification(notification: ClientNotification) {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue