fix ai suggestions

This commit is contained in:
zach 2026-03-06 15:11:21 -07:00
parent 7c479f9121
commit b2770ef028
2 changed files with 9 additions and 1 deletions

View file

@ -171,8 +171,14 @@ class _MapScreenState extends State<MapScreen> {
// Compute guessed locations with caching
final maxRangeKm = _estimateLoRaRangeKm(connector);
final filteredKeys = filteredByKeyPrefix
.map((c) => c.publicKeyHex)
.join(',');
final anchorKeys = allContactsWithLocation
.map((c) => c.publicKeyHex)
.join(',');
final cacheKey =
'${filteredByKeyPrefix.length}:${allContactsWithLocation.length}:${pathHistory.version}:${connector.currentSf}:${connector.currentBwHz}:${connector.currentTxPower}:${settings.mapShowGuessedLocations}';
'$filteredKeys|$anchorKeys|${pathHistory.version}:${connector.currentSf}:${connector.currentBwHz}:${connector.currentTxPower}:${settings.mapShowGuessedLocations}';
if (cacheKey != _guessedLocationsCacheKey) {
_guessedLocationsCacheKey = cacheKey;
_cachedGuessedLocations = settings.mapShowGuessedLocations

View file

@ -281,6 +281,7 @@ class PathHistoryService extends ChangeNotifier {
_autoRotationIndex.remove(contactPubKeyHex);
_floodStats.remove(contactPubKeyHex);
await _storage.clearPathHistory(contactPubKeyHex);
_version++;
notifyListeners();
}
@ -300,6 +301,7 @@ class PathHistoryService extends ChangeNotifier {
);
await _storage.savePathHistory(contactPubKeyHex, _cache[contactPubKeyHex]!);
_version++;
notifyListeners();
}