now shows correct position on first start of tracking
This commit is contained in:
@@ -303,8 +303,11 @@ class AddEntriesDialogHelper {
|
||||
);
|
||||
}
|
||||
|
||||
static void locationSettingsDialog(BuildContext context) async {
|
||||
return showDialog(
|
||||
static Future<bool> locationSettingsDialog(BuildContext context) async {
|
||||
|
||||
bool reload = false;
|
||||
|
||||
await showDialog(
|
||||
context: context,
|
||||
barrierDismissible: true,
|
||||
builder: (BuildContext context) {
|
||||
@@ -312,9 +315,10 @@ class AddEntriesDialogHelper {
|
||||
content: Text(AppLocalizations.of(context)!.needsAlwaysLocation),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Geolocator.openAppSettings();
|
||||
Navigator.pop(context);
|
||||
onPressed: () async {
|
||||
await Geolocator.openAppSettings();
|
||||
if (context.mounted) Navigator.pop(context);
|
||||
reload = true;
|
||||
},
|
||||
child: Text("Ok"),
|
||||
),
|
||||
@@ -328,6 +332,7 @@ class AddEntriesDialogHelper {
|
||||
);
|
||||
},
|
||||
);
|
||||
return reload;
|
||||
}
|
||||
|
||||
static Future<bool> deleteCompleteRouteDialog(BuildContext context) async {
|
||||
|
||||
Reference in New Issue
Block a user