fix(#830): count a direct (0-hop) repeater as a selectable path

D1: the picker excluded direct repeaters. hasPath required a non-empty path, but a direct 0-hop repeater has pathLength 0 and an empty path, so the owner's own adjacent repeater was greyed as 'No stored path'. Direct is a reachable (best-case) route; hasPath is now pathLength >= 0, excluding only pathLength -1 (flood/unknown). The reply-path already sends zero-hop for direct, which is correct.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
fix/812-land-814-815-on-dev
diffwireauto 1 month ago
parent b82d9390db
commit 1b0ff2b034

@ -333,7 +333,10 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
(c) => RepeaterChoice(
name: c.name,
pubKey: c.publicKey,
hasPath: c.pathLength >= 0 && c.path.isNotEmpty,
// A direct (0-hop) repeater has pathLength 0 and an empty path and
// is reachable (the best case). Only pathLength -1 (flood/unknown)
// has no usable route, so only that is treated as "no path".
hasPath: c.pathLength >= 0,
),
)
.toList();

Loading…
Cancel
Save

Powered by TurnKey Linux.