mirror of
https://github.com/FoggedLens/deflock-app.git
synced 2026-07-09 14:17:55 +02:00
Better loading indicator
This commit is contained in:
@@ -78,6 +78,11 @@ Future<List<OsmNode>> _fetchOverpassNodesWithSplitting({
|
||||
// Rate limits should NOT be split - just fail with extended backoff
|
||||
debugPrint('[fetchOverpassNodes] Rate limited - using extended backoff, not splitting');
|
||||
|
||||
// Report slow progress when backing off
|
||||
if (reportStatus) {
|
||||
NetworkStatus.instance.reportSlowProgress();
|
||||
}
|
||||
|
||||
// Wait longer for rate limits before giving up entirely
|
||||
await Future.delayed(const Duration(seconds: 30));
|
||||
return []; // Return empty rather than rethrowing - let caller handle error reporting
|
||||
@@ -88,6 +93,11 @@ Future<List<OsmNode>> _fetchOverpassNodesWithSplitting({
|
||||
return []; // Return empty - let caller handle error reporting
|
||||
}
|
||||
|
||||
// Report slow progress when we start splitting (only at the top level)
|
||||
if (reportStatus) {
|
||||
NetworkStatus.instance.reportSlowProgress();
|
||||
}
|
||||
|
||||
// Split the bounds into 4 quadrants and try each separately
|
||||
debugPrint('[fetchOverpassNodes] Splitting area into quadrants (depth: $splitDepth)');
|
||||
final quadrants = _splitBounds(bounds);
|
||||
|
||||
Reference in New Issue
Block a user