retry background tiles if status is >= 400 and not 404

This commit is contained in:
bytedream 2024-03-27 02:34:18 +01:00
parent 799d1cb335
commit 4b384b378a

View File

@ -35,7 +35,7 @@ class _MapViewState extends State<MapView> {
tileProvider: NetworkTileProvider( tileProvider: NetworkTileProvider(
httpClient: RetryClient( httpClient: RetryClient(
Client(), Client(),
when: (response) => response.statusCode == 502) when: (response) => response.statusCode >= 400 && response.statusCode != 404)
), ),
), ),
WatchState<MapState>((context, state) => state.getActiveMarker != null ? MarkerLayer( WatchState<MapState>((context, state) => state.getActiveMarker != null ? MarkerLayer(