shouldUpdateNewsCacheImpl method

bool shouldUpdateNewsCacheImpl(
  1. LatLng newPosition,
  2. double newZoom
)

Checks if news cache should be updated based on position change.

Implementation

bool shouldUpdateNewsCacheImpl(LatLng newPosition, double newZoom) {
  final result = shouldUpdateNewsCache(
    newPosition: newPosition,
    newZoom: newZoom,
    lastPosition: lastNewsUpdatePosition,
    lastZoom: lastNewsUpdateZoom,
  );

  if (result) {
    lastNewsUpdatePosition = newPosition;
    lastNewsUpdateZoom = newZoom;
  }

  return result;
}