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
+2 -9
View File
@@ -176,20 +176,13 @@ class _MapScreenState extends State<MapScreen> {
// Filter by location
final contactsWithLocation = filteredByKeyPrefix.where((c) {
if (!c.hasLocation) {
return false;
}
return _checkLocationPlausibility(c.latitude!, c.longitude!);
return c.hasLocation;
}).toList();
// All contacts with a known location — used as anchors regardless of
// time/key-prefix filters so that repeaters are always available.
final allContactsWithLocation = allContacts
.where(
(c) =>
c.hasLocation &&
_checkLocationPlausibility(c.latitude!, c.longitude!),
)
.where((c) => c.hasLocation)
.toList();
// Compute guessed locations with caching