mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-04-20 22:13:48 +00:00
fix ai suggestions
This commit is contained in:
parent
7c479f9121
commit
b2770ef028
2 changed files with 9 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue