mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Mobile: fix geolocation
This commit is contained in:
parent
d6cc84aabd
commit
2b322352ed
@ -1,3 +1,5 @@
|
||||
import Geolocation from '@react-native-community/geolocation';
|
||||
|
||||
const Setting = require('lib/models/Setting.js');
|
||||
|
||||
class GeolocationReact {
|
||||
@ -24,7 +26,7 @@ class GeolocationReact {
|
||||
if (!('timeout' in options)) options.timeout = 10000;
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
navigator.geolocation.getCurrentPosition(
|
||||
Geolocation.getCurrentPosition(
|
||||
data => {
|
||||
resolve(data);
|
||||
},
|
||||
|
5
ReactNativeClient/package-lock.json
generated
5
ReactNativeClient/package-lock.json
generated
@ -2108,6 +2108,11 @@
|
||||
"resolved": "https://registry.npmjs.org/@react-native-community/cli-types/-/cli-types-3.0.0.tgz",
|
||||
"integrity": "sha512-ng6Tm537E/M42GjE4TRUxQyL8sRfClcL7bQWblOCoxPZzJ2J3bdALsjeG3vDnVCIfI/R0AeFalN9KjMt0+Z/Zg=="
|
||||
},
|
||||
"@react-native-community/geolocation": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@react-native-community/geolocation/-/geolocation-2.0.2.tgz",
|
||||
"integrity": "sha512-tTNXRCgnhJBu79mulQwzabXRpDqfh/uaDqfHVpvF0nX4NTpolpy6mvTRiFg7eWFPGRArsnZz1EYp6rHfJWGgEA=="
|
||||
},
|
||||
"@react-native-community/push-notification-ios": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@react-native-community/push-notification-ios/-/push-notification-ios-1.0.5.tgz",
|
||||
|
@ -14,6 +14,7 @@
|
||||
"log-android": "adb logcat *:S ReactNative:V ReactNativeJS:V"
|
||||
},
|
||||
"dependencies": {
|
||||
"@react-native-community/geolocation": "^2.0.2",
|
||||
"@react-native-community/push-notification-ios": "^1.0.5",
|
||||
"@react-native-community/slider": "^2.0.8",
|
||||
"async-mutex": "^0.1.3",
|
||||
|
Loading…
Reference in New Issue
Block a user