mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-09-06 06:25:20 +02:00
Revert "declare geposition variable"
the variable scope cannot be local, otherwise some watchfaces/watchapps
may break
This reverts commit 7ddd2a0
This commit is contained in:
parent
6cc29f041c
commit
206b718155
@ -1,6 +1,6 @@
|
|||||||
var reportedPositionFailures = 0;
|
var reportedPositionFailures = 0;
|
||||||
navigator.geolocation.getCurrentPosition = function(success, failure, options) { //override because default implementation requires GPS permission
|
navigator.geolocation.getCurrentPosition = function(success, failure, options) { //override because default implementation requires GPS permission
|
||||||
var geoposition = JSON.parse(GBjs.getCurrentPosition());
|
geoposition = JSON.parse(GBjs.getCurrentPosition());
|
||||||
|
|
||||||
if(options && options.maximumAge && (geoposition.timestamp < Date.now() - options.maximumAge) && reportedPositionFailures <= 10 ) {
|
if(options && options.maximumAge && (geoposition.timestamp < Date.now() - options.maximumAge) && reportedPositionFailures <= 10 ) {
|
||||||
reportedPositionFailures++;
|
reportedPositionFailures++;
|
||||||
|
Loading…
Reference in New Issue
Block a user