You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-15 23:00:36 +02:00
Better handling of network errors and improved borders
This commit is contained in:
@ -259,11 +259,21 @@ class Note extends BaseItem {
|
||||
geoData = Object.assign({}, this.geolocationCache_);
|
||||
} else {
|
||||
this.geolocationUpdating_ = true;
|
||||
|
||||
this.logger().info('Fetching geolocation...');
|
||||
geoData = await shim.Geolocation.currentPosition();
|
||||
try {
|
||||
geoData = await shim.Geolocation.currentPosition();
|
||||
} catch (error) {
|
||||
this.logger().error('Could not get lat/long for note ' + noteId + ': ', error);
|
||||
geoData = null;
|
||||
}
|
||||
|
||||
this.geolocationUpdating_ = false;
|
||||
|
||||
if (!geoData) return;
|
||||
|
||||
this.logger().info('Got lat/long');
|
||||
this.geolocationCache_ = geoData;
|
||||
this.geolocationUpdating_ = false;
|
||||
}
|
||||
|
||||
this.logger().info('Updating lat/long of note ' + noteId);
|
||||
|
Reference in New Issue
Block a user