1
0
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

commit 959a8b59d1
Author: Roman Musin <musinrr@gmail.com>
Date:   Thu Jun 4 21:56:43 2020 +0100

    Initialize keychain service when starting mobile app

commit 2b322352ed
Author: Roman Musin <musinrr@gmail.com>
Date:   Thu Jun 4 21:32:40 2020 +0100

    Mobile: fix geolocation
This commit is contained in:
Laurent Cozic
2020-06-05 00:08:09 +01:00
parent d6cc84aabd
commit 0f4a781df0
6 changed files with 22 additions and 2 deletions

View File

@ -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);
},