From 85eac17b18ec5bf01e52b2659f46e62686b9b9b3 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Mon, 12 Aug 2024 13:33:56 +0200 Subject: [PATCH] Attempt to fix geolocation text --- package.json | 2 +- src/Logic/State/GeoLocationState.ts | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 05f549998..47b8df8a2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mapcomplete", - "version": "0.45.1", + "version": "0.45.2", "repository": "https://github.com/pietervdvn/MapComplete", "description": "A small website to edit OSM easily", "bugs": "https://github.com/pietervdvn/MapComplete/issues", diff --git a/src/Logic/State/GeoLocationState.ts b/src/Logic/State/GeoLocationState.ts index a17da91e3..805914588 100644 --- a/src/Logic/State/GeoLocationState.ts +++ b/src/Logic/State/GeoLocationState.ts @@ -105,9 +105,15 @@ export class GeoLocationState { this.gpsStateExplanation = this.gpsAvailable.map(available => { + if (this.currentGPSLocation.data !== undefined) { + if (!this.allowMoving.data) { + return Translations.t.general.visualFeedback.islocked + } + return Translations.t.general.labels.jumpToLocation } + if (!available) { return Translations.t.general.labels.locationNotAvailable } @@ -120,13 +126,6 @@ export class GeoLocationState { if (this.permission.data === "requested") { return Translations.t.general.waitingForGeopermission } - - - if (!this.allowMoving.data) { - return Translations.t.general.visualFeedback.islocked - } - - return Translations.t.general.waitingForLocation }, [this.allowMoving, this.permission, this.currentGPSLocation])