Fix branch after android testing. Add background data refresh, not just location refresh.

Tested on a Pixel 10 Pro. These changes were needed to work on real hardware. Also, which background location updating was working, the data was not refreshing in the background. This also adds that. It will pull nodes in a 5km area around your location and update when you within 1km of the area. These values may need to be adjusted if there is increased load on the servers.
This commit is contained in:
Ryan Brown
2026-08-27 10:55:11 -07:00
parent 51037f3710
commit 3f118a77c4
2 changed files with 69 additions and 7 deletions
+10
View File
@@ -217,6 +217,16 @@ class MapViewState extends State<MapView> with WidgetsBindingObserver {
}
return [];
},
onFetchBackgroundNodes: (bounds) async {
if (!mounted) return;
final appState = context.read<AppState>();
NodeProviderWithCache.instance.fetchAndUpdate(
bounds: bounds,
profiles: appState.enabledProfiles,
uploadMode: appState.uploadMode,
);
},
onMapMovedProgrammatically: () {
// Refresh nodes when GPS controller moves the map
_refreshNodesFromProvider();