From b7d5ee5754f3941db3ba31d79ee51aac7c6a7985 Mon Sep 17 00:00:00 2001 From: ericz Date: Mon, 2 Mar 2026 21:35:16 +0100 Subject: [PATCH 1/2] Allow search for prefix as Displayed in contact list. --- lib/utils/contact_search.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/utils/contact_search.dart b/lib/utils/contact_search.dart index 31def4e..2359793 100644 --- a/lib/utils/contact_search.dart +++ b/lib/utils/contact_search.dart @@ -19,6 +19,9 @@ String? _extractHexPrefix(String query) { if (cleaned.startsWith('0x')) { cleaned = cleaned.substring(2); } + if (cleaned.startsWith('<')) { + cleaned = cleaned.substring(1).replaceAll(">", ""); + } cleaned = cleaned.replaceAll(' ', ''); if (cleaned.length < 2) return null; if (!RegExp(r'^[0-9a-f]+$').hasMatch(cleaned)) return null; From 647fe1523ef4b0275b0ca63a24a6911fbb267c25 Mon Sep 17 00:00:00 2001 From: ericz Date: Mon, 2 Mar 2026 21:42:44 +0100 Subject: [PATCH 2/2] make it that even combination <0x90 is allowed. --- lib/utils/contact_search.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/utils/contact_search.dart b/lib/utils/contact_search.dart index 2359793..318f307 100644 --- a/lib/utils/contact_search.dart +++ b/lib/utils/contact_search.dart @@ -16,12 +16,12 @@ bool matchesContactQuery(Contact contact, String query) { String? _extractHexPrefix(String query) { var cleaned = query; - if (cleaned.startsWith('0x')) { - cleaned = cleaned.substring(2); - } if (cleaned.startsWith('<')) { cleaned = cleaned.substring(1).replaceAll(">", ""); } + if (cleaned.startsWith('0x')) { + cleaned = cleaned.substring(2); + } cleaned = cleaned.replaceAll(' ', ''); if (cleaned.length < 2) return null; if (!RegExp(r'^[0-9a-f]+$').hasMatch(cleaned)) return null;