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:
James Rich 2026-04-17 09:42:44 -05:00
parent 9c75f5a3f4
commit 6d70d154e6
8 changed files with 26 additions and 12 deletions

View file

@ -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) {}