Location fixes

This commit is contained in:
estevez-dev
2020-07-08 11:49:05 +03:00
parent 2fb296b7a8
commit 5aa6171c50
5 changed files with 9 additions and 20 deletions

View File

@ -40,7 +40,7 @@ class _IntegrationSettingsPageState extends State<IntegrationSettingsPage> {
_accuracy = prefs.getInt("location-updates-priority") ?? 102;
_locationTrackingEnabled = (prefs.getInt("location-updates-state") ?? 0) > 0;
_showNotification = prefs.getBool("location-updates-show-notification") ?? true;
_locationInterval = Duration(seconds: prefs.getInt("location-updates-interval") ??
_locationInterval = Duration(milliseconds: prefs.getInt("location-updates-interval") ??
AppSettings().defaultLocationUpdateIntervalSeconds);
});
});
@ -100,7 +100,7 @@ class _IntegrationSettingsPageState extends State<IntegrationSettingsPage> {
if (state) {
try {
await platform.invokeMethod('startLocationService', <String, dynamic>{
'location-updates-interval': _locationInterval.inSeconds,
'location-updates-interval': _locationInterval.inMilliseconds,
'location-updates-priority': _accuracy,
'location-updates-show-notification': _showNotification
});