Added relays count#3773
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds functionality to display the count of relay nodes that were heard relaying a message, replacing the previous single relay node display with a count-based approach.
Key Changes:
- Added
relaysfield toDataPacketandMessagemodels to track relay count - Modified
DeliveryInfoDialogto display relay count using pluralized strings instead of a single relay node name - Implemented relay counting logic in
MeshService.handleAckNak()by incrementing the count each time an ACK/NAK is received
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| core/model/src/main/kotlin/org/meshtastic/core/model/DataPacket.kt | Added relays: Int = 0 field to track relay count |
| core/database/src/main/kotlin/org/meshtastic/core/database/model/Message.kt | Added relays: Int = 0 field to Message model |
| core/database/src/main/kotlin/org/meshtastic/core/database/entity/Packet.kt | Updated PacketEntity to include relays field mapping |
| app/src/main/java/com/geeksville/mesh/service/MeshService.kt | Added relay count increment logic in handleAckNak function |
| feature/messaging/src/main/kotlin/org/meshtastic/feature/messaging/MessageList.kt | Passed relays count to DeliveryInfo dialog |
| feature/messaging/src/main/kotlin/org/meshtastic/feature/messaging/DeliveryInfoDialog.kt | Updated UI to display relay count with plural strings instead of single relay node name |
| core/strings/src/commonMain/composeResources/values/strings.xml | Added pluralized string resource for relay count display |
| @Suppress("UnusedParameter") | ||
| @Composable | ||
| fun DeliveryInfo( | ||
| title: StringResource, | ||
| resendOption: Boolean, | ||
| text: StringResource? = null, | ||
| relayNodeName: String? = null, |
There was a problem hiding this comment.
The @Suppress("UnusedParameter") annotation is overly broad as it suppresses warnings for all parameters. The relayNodeName parameter is actually unused (it was replaced with the relays parameter). Consider removing the unused parameter instead of suppressing the warning, or make the suppression more specific to only that parameter.
| @Suppress("UnusedParameter") | |
| @Composable | |
| fun DeliveryInfo( | |
| title: StringResource, | |
| resendOption: Boolean, | |
| text: StringResource? = null, | |
| relayNodeName: String? = null, | |
| @Composable | |
| fun DeliveryInfo( | |
| title: StringResource, | |
| resendOption: Boolean, | |
| text: StringResource? = null, |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Benjamin Faershtein <119711889+RCGV1@users.noreply.github.com>
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3773 +/- ##
======================================
Coverage ? 0.54%
======================================
Files ? 386
Lines ? 22470
Branches ? 2815
======================================
Hits ? 122
Misses ? 22327
Partials ? 21 ☔ View full report in Codecov by Sentry. |
Show how many nodes we hear relay our message.

For now, disable the relay node field shown, since this is not as useful and doesn't show the full list of relayers.