You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-15 23:00:36 +02:00
Mobile: Fixes #3240: Fix geolocation
Co-authored-by: Roman Musin <musinrr@gmail.com> Squashed commit of the following: commit c3916ee544d2b59e6b0c760366a9a2b5f821b029 Author: Laurent Cozic <laurent@cozic.net> Date: Fri Jun 5 00:01:18 2020 +0100 Fixed for iOS commit959a8b59d1
Author: Roman Musin <musinrr@gmail.com> Date: Thu Jun 4 21:56:43 2020 +0100 Initialize keychain service when starting mobile app commit2b322352ed
Author: Roman Musin <musinrr@gmail.com> Date: Thu Jun 4 21:32:40 2020 +0100 Mobile: fix geolocation
This commit is contained in:
@ -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);
|
||||
},
|
||||
|
Reference in New Issue
Block a user