Remove and disable elasticity

This commit is contained in:
Anton Tananaev 2025-06-13 14:28:18 -07:00
parent e243aacde7
commit 57a38d964f
2 changed files with 2 additions and 16 deletions

View file

@ -16,7 +16,6 @@ class Preferences {
static const String heartbeat = 'heartbeat';
static const String buffer = 'buffer';
static const String preventSuspend = 'prevent_suspend';
static const String disableElasticity = 'disable_elasticity';
static const String stopDetection = 'stop_detection';
static Future<void> init() async {
@ -26,8 +25,7 @@ class Preferences {
: SharedPreferencesOptions(),
cacheOptions: SharedPreferencesWithCacheOptions(
allowList: {
id, url, accuracy, interval, distance, buffer, heartbeat,
preventSuspend, disableElasticity, stopDetection,
id, url, accuracy, interval, distance, buffer, heartbeat, preventSuspend, stopDetection,
'device_id_preference', 'server_url_preference', 'accuracy_preference',
'frequency_preference', 'distance_preference', 'buffer_preference',
},
@ -78,7 +76,7 @@ class Preferences {
locationTemplate: _locationTemplate(),
showsBackgroundLocationIndicator: false,
preventSuspend: instance.getBool(preventSuspend),
disableElasticity: instance.getBool(disableElasticity),
disableElasticity: true,
disableStopDetection: instance.getBool(stopDetection) == false,
pausesLocationUpdatesAutomatically: instance.getBool(stopDetection) == false,
);