Monolithic reimplementation of node fetching from overpass/offline areas. Prevent submissions in areas without cache coverage. Also fixes offline node loading.

This commit is contained in:
stopflock
2026-01-30 21:34:55 -06:00
parent 4a36c52982
commit 79d2fe711d
13 changed files with 206 additions and 15 deletions
+2 -3
View File
@@ -19,12 +19,12 @@ class NodeProviderWithCache extends ChangeNotifier {
NodeProviderWithCache._internal();
final NodeDataManager _nodeDataManager = NodeDataManager();
final NodeSpatialCache _cache = NodeSpatialCache();
Timer? _debounceTimer;
/// Get cached nodes for the given bounds, filtered by enabled profiles
List<OsmNode> getCachedNodesForBounds(LatLngBounds bounds) {
final allNodes = _cache.getNodesFor(bounds);
// Use the same cache instance as NodeDataManager
final allNodes = NodeSpatialCache().getNodesFor(bounds);
final enabledProfiles = AppState.instance.enabledProfiles;
// If no profiles are enabled, show no nodes
@@ -68,7 +68,6 @@ class NodeProviderWithCache extends ChangeNotifier {
/// Clear the cache and repopulate with pending nodes from upload queue
void clearCache() {
_cache.clear();
_nodeDataManager.clearCache();
// Repopulate with pending nodes from upload queue if available
_repopulatePendingNodesAfterClear();