Set interval to null instead of zero
This commit is contained in:
parent
5c52efb937
commit
f3d0bdcefc
1 changed files with 2 additions and 1 deletions
|
|
@ -53,6 +53,7 @@ class Preferences {
|
||||||
}
|
}
|
||||||
|
|
||||||
static bg.Config geolocationConfig() {
|
static bg.Config geolocationConfig() {
|
||||||
|
final locationUpdateInterval = (instance.getInt(interval) ?? 0) * 1000;
|
||||||
final heartbeatInterval = instance.getInt(heartbeat) ?? 0;
|
final heartbeatInterval = instance.getInt(heartbeat) ?? 0;
|
||||||
return bg.Config(
|
return bg.Config(
|
||||||
enableHeadless: true,
|
enableHeadless: true,
|
||||||
|
|
@ -68,7 +69,7 @@ class Preferences {
|
||||||
"device_id": instance.getString(id),
|
"device_id": instance.getString(id),
|
||||||
},
|
},
|
||||||
distanceFilter: instance.getInt(distance)?.toDouble(),
|
distanceFilter: instance.getInt(distance)?.toDouble(),
|
||||||
locationUpdateInterval: (instance.getInt(interval) ?? 0) * 1000,
|
locationUpdateInterval: locationUpdateInterval > 0 ? locationUpdateInterval : null,
|
||||||
heartbeatInterval: heartbeatInterval > 0 ? heartbeatInterval : null,
|
heartbeatInterval: heartbeatInterval > 0 ? heartbeatInterval : null,
|
||||||
maxRecordsToPersist: instance.getBool(buffer) != false ? -1 : 1,
|
maxRecordsToPersist: instance.getBool(buffer) != false ? -1 : 1,
|
||||||
logLevel: bg.Config.LOG_LEVEL_VERBOSE,
|
logLevel: bg.Config.LOG_LEVEL_VERBOSE,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue