Enhance location handling and improve path trace functionality across screens

This commit is contained in:
Winston Lowe
2026-03-14 17:51:24 -07:00
parent 24fa78741b
commit 06a906f4f7
10 changed files with 138 additions and 100 deletions
+14 -2
View File
@@ -4753,8 +4753,20 @@ class MeshCoreConnector extends ChangeNotifier {
// CRITICAL: Preserve user's path override when contact is refreshed from device
_contacts[existingIndex] = existing.copyWith(
latitude: hasLocation ? latitude : existing.latitude,
longitude: hasLocation ? longitude : existing.longitude,
latitude:
hasLocation &&
latitude != null &&
latitude.abs() <= 90 &&
longitude != 0
? latitude
: existing.latitude,
longitude:
hasLocation &&
longitude != null &&
longitude.abs() <= 180 &&
longitude != 0
? longitude
: existing.longitude,
name: hasName ? name : existing.name,
path: Uint8List.fromList(path.reversed.toList()),
pathLength: path.length,