mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-07-12 03:27:06 +10:00
fix double entry due to mixed 1byte and 2byte paths
This commit is contained in:
@@ -12,9 +12,18 @@ import 'signal_ui.dart';
|
||||
Contact? _getRepeaterPrefixMatchNearLocation(
|
||||
List<Contact> contacts,
|
||||
List<int> pubkeyPrefix, {
|
||||
String? contactKeyHex,
|
||||
LatLng? searchPoint,
|
||||
bool preferFavorites = false,
|
||||
}) {
|
||||
if (contactKeyHex != null) {
|
||||
for (final c in contacts) {
|
||||
if (c.publicKeyHex == contactKeyHex) {
|
||||
return c;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final candidates = contacts
|
||||
.where(
|
||||
(c) =>
|
||||
@@ -242,6 +251,7 @@ class _SNRIndicatorState extends State<SNRIndicator> {
|
||||
final contact = _getRepeaterPrefixMatchNearLocation(
|
||||
allContacts,
|
||||
repeater.pubkeyPrefix,
|
||||
contactKeyHex: repeater.contactKeyHex,
|
||||
searchPoint: selfPoint,
|
||||
preferFavorites: true,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user