Add check for geolocation update

This commit is contained in:
Philipp Lang 2023-08-15 13:24:07 +02:00
parent 255a7819f5
commit 132d15f368
2 changed files with 6 additions and 1 deletions

View File

@ -9,4 +9,6 @@ interface Geolocatable
public function getAddressForGeolocation(): ?Address;
public function destroyCoordinate(): void;
public function needsGeolocationUpdate(): bool;
}

View File

@ -12,7 +12,10 @@ trait HasGeolocation
if (!static::$geolocationEnabled) {
return;
}
if ($model->needsGeolocationUpdate()) {
dispatch(new FillCoordsJob($model));
}
});
}