mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-06-21 09:55:27 +10:00
Refactor contact handling by removing unnecessary mapping and improving clarity across multiple screens
This commit is contained in:
@@ -58,10 +58,9 @@ class GpxExport {
|
||||
}
|
||||
|
||||
void addRepeaters() {
|
||||
final contacts = _connector.allContacts
|
||||
.where((c) => c.type == advTypeRepeater || c.type == advTypeRoom)
|
||||
.map((c) => _connector.getFromDiscovered(c))
|
||||
.toList();
|
||||
final contacts = _connector.allContacts.where(
|
||||
(c) => c.type == advTypeRepeater || c.type == advTypeRoom,
|
||||
);
|
||||
for (var contact in contacts) {
|
||||
if (contact.latitude == null || contact.longitude == null) {
|
||||
continue;
|
||||
@@ -80,10 +79,7 @@ class GpxExport {
|
||||
}
|
||||
|
||||
void addContacts() {
|
||||
final contacts = _connector.allContacts
|
||||
.where((c) => c.type == advTypeChat)
|
||||
.map((c) => _connector.getFromDiscovered(c))
|
||||
.toList();
|
||||
final contacts = _connector.allContacts.where((c) => c.type == advTypeChat);
|
||||
for (var contact in contacts) {
|
||||
if (contact.latitude == null || contact.longitude == null) {
|
||||
continue;
|
||||
@@ -102,9 +98,7 @@ class GpxExport {
|
||||
}
|
||||
|
||||
void addAll() {
|
||||
final contacts = _connector.allContacts
|
||||
.map((c) => _connector.getFromDiscovered(c))
|
||||
.toList();
|
||||
final contacts = _connector.allContacts;
|
||||
for (var contact in contacts) {
|
||||
if (contact.latitude == null || contact.longitude == null) {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user