Fix manual path search ranking, hash matching, and layout

Rank name prefixes ahead of other substring matches, match hop hashes
in the path builder and contact search, and keep the hop list and hex
field on screen while the keyboard is open.

Co-authored-by: zjs81 <zjs81@users.noreply.github.com>
This commit is contained in:
Cursor Agentandzjs81 committed 2026-11-20 21:43:49 +00:00
1 parent 34ea0cb7ca
commit a1604af4d4
51 files changed
+882 -327

No files matched your search

+3 -6
View File
@@ -7,6 +7,7 @@ import '../l10n/contact_localization.dart';
import '../l10n/l10n.dart';
import '../models/contact.dart';
import '../theme/mesh_theme.dart';
import '../utils/contact_search.dart';
import 'mesh_ui.dart';
/// Lets the user pick a saved contact (or themself) and appends the encoded
@@ -50,14 +51,10 @@ class _ShareContactSheetState extends State<_ShareContactSheet> {
final contacts =
connector.contacts
.where(
(c) =>
c.publicKey.length == 32 &&
(needle.isEmpty || c.name.toLowerCase().contains(needle)),
(c) => c.publicKey.length == 32 && matchesContactQuery(c, needle),
)
.toList()
..sort(
(a, b) => a.name.toLowerCase().compareTo(b.name.toLowerCase()),
);
..sort((a, b) => compareContactQueryRank(a, b, needle));
final selfName = connector.selfName ?? '';
final showSelf =
selfKey != null &&