From 39312adc2af4a42f7bfcf6c7674e796de7eabb9f Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Sun, 15 Dec 2024 18:01:13 +0100 Subject: [PATCH] =?UTF-8?q?On=20envoie=20des=20localisations=20quand=20on?= =?UTF-8?q?=20est=20connect=C3=A9=E2=8B=85e,=20pas=20l'inverse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/app.json | 7 ------- client/components/GeolocationProvider.tsx | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/client/app.json b/client/app.json index d230d74..834c2e4 100644 --- a/client/app.json +++ b/client/app.json @@ -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", diff --git a/client/components/GeolocationProvider.tsx b/client/components/GeolocationProvider.tsx index 87b8104..04fc960 100644 --- a/client/components/GeolocationProvider.tsx +++ b/client/components/GeolocationProvider.tsx @@ -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)