fix(#150): repeater trace adapts to its route (Path Trace when routed, Ping when direct)

The repeater contact menu hardcoded "Ping" and always sent a target-only
(direct) trace, so a multi-hop repeater offered a "Ping" that could never
return. Mirror the room behavior: a repeater with a known route is
labelled "Path Trace" and traced along that route (round-trip); only a
direct neighbour (no path) shows "Ping" and pings directly.

Bumps build to +48 for the b48 test binary.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
pull/205/head
Strycher 3 weeks ago
parent 7c46f1d662
commit 711f0b5814

@ -1266,7 +1266,11 @@ class _ContactsScreenState extends State<ContactsScreen>
if (isRepeater) ...[
ListTile(
leading: const Icon(Icons.radar, color: Colors.green),
title: Text(context.l10n.contacts_ping),
title: Text(
contact.pathBytesForDisplay.isNotEmpty
? context.l10n.contacts_pathTrace
: context.l10n.contacts_ping,
),
onTap: () {
final hw = context
.read<MeshCoreConnector>()
@ -1275,13 +1279,18 @@ class _ContactsScreenState extends State<ContactsScreen>
context,
MaterialPageRoute(
builder: (context) => PathTraceMapScreen(
title: context.l10n.contacts_repeaterPing,
path: Uint8List.fromList(
contact.publicKey.sublist(
0,
PathHelper.traceHopBytes(hw),
),
),
title: contact.pathBytesForDisplay.isNotEmpty
? context.l10n.contacts_repeaterPathTrace
: context.l10n.contacts_repeaterPing,
path: contact.pathBytesForDisplay.isNotEmpty
? contact.pathBytesForDisplay
: Uint8List.fromList(
contact.publicKey.sublist(
0,
PathHelper.traceHopBytes(hw),
),
),
flipPathAround: contact.pathBytesForDisplay.isNotEmpty,
targetContact: contact,
pathHashByteWidth: hw,
),

@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.1.2-rc.1+47
version: 1.1.2-rc.1+48
environment:
sdk: ^3.9.2

Loading…
Cancel
Save

Powered by TurnKey Linux.