mirror of
https://github.com/FoggedLens/deflock-app.git
synced 2026-07-13 15:47:23 +02:00
improve data indicator, offline fetching, offline area loading
This commit is contained in:
@@ -55,7 +55,7 @@ class _DownloadAreaDialogState extends State<DownloadAreaDialog> {
|
||||
);
|
||||
}
|
||||
|
||||
final minZoom = kWorldMaxZoom + 1;
|
||||
final minZoom = 1; // Always start from zoom 1 to show area overview when zoomed out
|
||||
final maxZoom = _zoom.toInt();
|
||||
|
||||
// Calculate maximum possible zoom based on tile count limit
|
||||
|
||||
@@ -300,8 +300,8 @@ class MapViewState extends State<MapView> {
|
||||
appState.updateEditSession(target: pos.center);
|
||||
}
|
||||
|
||||
// Show waiting indicator when map moves (user is expecting new content)
|
||||
NetworkStatus.instance.setWaiting();
|
||||
// Start dual-source waiting when map moves (user is expecting new tiles AND nodes)
|
||||
NetworkStatus.instance.setDualSourceWaiting();
|
||||
|
||||
// Only clear tile queue on significant ZOOM changes (not panning)
|
||||
final currentZoom = pos.zoom;
|
||||
@@ -323,6 +323,9 @@ class MapViewState extends State<MapView> {
|
||||
// Request more cameras on any map movement/zoom at valid zoom level (slower debounce)
|
||||
if (pos.zoom >= 10) {
|
||||
_cameraDebounce(_refreshCamerasFromProvider);
|
||||
} else {
|
||||
// Skip nodes at low zoom - report immediate completion (brutalist approach)
|
||||
NetworkStatus.instance.reportNodeComplete();
|
||||
}
|
||||
},
|
||||
),
|
||||
|
||||
@@ -35,7 +35,7 @@ class NetworkStatusIndicator extends StatelessWidget {
|
||||
break;
|
||||
|
||||
case NetworkStatusType.success:
|
||||
message = 'Tiles loaded';
|
||||
message = 'Done';
|
||||
icon = Icons.check_circle;
|
||||
color = Colors.green;
|
||||
break;
|
||||
@@ -43,7 +43,7 @@ class NetworkStatusIndicator extends StatelessWidget {
|
||||
case NetworkStatusType.issues:
|
||||
switch (networkStatus.currentIssueType) {
|
||||
case NetworkIssueType.osmTiles:
|
||||
message = 'OSM tiles slow';
|
||||
message = 'Tile provider slow';
|
||||
icon = Icons.map_outlined;
|
||||
color = Colors.orange;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user