Refactor contact handling by removing unnecessary mapping and improving clarity across multiple screens

This commit is contained in:
Winston Lowe
2026-03-26 16:46:01 -07:00
parent 5dfccb9a94
commit 4ce7878539
5 changed files with 37 additions and 45 deletions
+1 -3
View File
@@ -283,9 +283,7 @@ class _PathTraceMapScreenState extends State<PathTraceMapScreen> {
if (widget.pathContacts != null) {
pathContacts = {for (var c in widget.pathContacts!) c.publicKey[0]: c};
} else {
final contacts = connector.allContactsUnfiltered
.map((c) => connector.getFromDiscovered(c))
.toList();
final contacts = connector.allContactsUnfiltered;
contacts.where((c) => c.type != advTypeChat).forEach((repeater) {
if (lastContact.latitude != null &&
lastContact.longitude != null &&