On envoie des localisations quand on est connecté⋅e, pas l'inverse
This commit is contained in:
parent
76643fcc62
commit
39312adc2a
@ -19,13 +19,6 @@
|
||||
},
|
||||
"package": "eu.luemy.traintrapemoi",
|
||||
"permissions": [
|
||||
"android.permission.ACCESS_COARSE_LOCATION",
|
||||
"android.permission.ACCESS_FINE_LOCATION",
|
||||
"android.permission.ACCESS_BACKGROUND_LOCATION",
|
||||
"android.permission.FOREGROUND_SERVICE",
|
||||
"android.permission.FOREGROUND_SERVICE_LOCATION",
|
||||
"android.permission.RECEIVE_BOOT_COMPLETED",
|
||||
"android.permission.WAKE_LOCK",
|
||||
"android.permission.ACCESS_COARSE_LOCATION",
|
||||
"android.permission.ACCESS_FINE_LOCATION",
|
||||
"android.permission.ACCESS_BACKGROUND_LOCATION",
|
||||
|
@ -22,7 +22,7 @@ export default function GeolocationProvider({ children }: { children: ReactNode
|
||||
|
||||
if (Platform.OS !== "web") {
|
||||
useEffect(() => {
|
||||
if (geolocationsQueue.length === 0 || geolocationMutation.isPending || isAuthValid(auth))
|
||||
if (geolocationsQueue.length === 0 || geolocationMutation.isPending || !isAuthValid(auth))
|
||||
return
|
||||
const locToSend = geolocationsQueue[0]
|
||||
geolocationMutation.mutate(locToSend)
|
||||
|
Loading…
Reference in New Issue
Block a user