Add check for geolocation update
This commit is contained in:
parent
255a7819f5
commit
132d15f368
|
@ -9,4 +9,6 @@ interface Geolocatable
|
|||
public function getAddressForGeolocation(): ?Address;
|
||||
|
||||
public function destroyCoordinate(): void;
|
||||
|
||||
public function needsGeolocationUpdate(): bool;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,10 @@ trait HasGeolocation
|
|||
if (!static::$geolocationEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($model->needsGeolocationUpdate()) {
|
||||
dispatch(new FillCoordsJob($model));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue