mirror of
https://github.com/FoggedLens/deflock-app.git
synced 2026-07-04 11:47:58 +02:00
Fix fetching and loading indicator in sandbox
This commit is contained in:
@@ -70,12 +70,18 @@ class NodeRefreshController {
|
||||
}
|
||||
|
||||
final zoom = controller.mapController.camera.zoom;
|
||||
if (zoom < kNodeMinZoomLevel) {
|
||||
// Show a snackbar-style bubble warning
|
||||
// Use the correct minimum zoom level based on upload mode
|
||||
final minZoom = uploadMode == UploadMode.sandbox ? kOsmApiMinZoomLevel : kNodeMinZoomLevel;
|
||||
|
||||
if (zoom < minZoom) {
|
||||
// Show a snackbar-style bubble warning with mode-specific message
|
||||
if (context.mounted) {
|
||||
final message = uploadMode == UploadMode.sandbox
|
||||
? 'Nodes not drawn below zoom level $minZoom in sandbox mode (OSM API limits)'
|
||||
: 'Nodes not drawn below zoom level $minZoom';
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text('Nodes not drawn below zoom level $kNodeMinZoomLevel'),
|
||||
content: Text(message),
|
||||
duration: const Duration(seconds: 2),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user