From da8efcd43f18d6d82e24d182363ff07208f40ccb Mon Sep 17 00:00:00 2001 From: estevez-dev Date: Tue, 30 Jun 2020 13:16:43 +0300 Subject: [PATCH] WIP #571 --- lib/pages/settings/integration_settings.part.dart | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/pages/settings/integration_settings.part.dart b/lib/pages/settings/integration_settings.part.dart index 94977a1..671fb87 100644 --- a/lib/pages/settings/integration_settings.part.dart +++ b/lib/pages/settings/integration_settings.part.dart @@ -17,6 +17,7 @@ class _IntegrationSettingsPageState extends State { bool _locationTrackingEnabled = false; bool _foregroundLocationTrackingEnabled = false; bool _wait = false; + bool _changedHere = false; @override void initState() { @@ -45,6 +46,7 @@ class _IntegrationSettingsPageState extends State { if (_locationInterval < 720) { setState(() { _locationInterval = _locationInterval + 5; + _changedHere = true; }); } } @@ -53,6 +55,7 @@ class _IntegrationSettingsPageState extends State { if (_locationInterval > 5) { setState(() { _locationInterval = _locationInterval - 5; + _changedHere = true; }); } } @@ -80,6 +83,11 @@ class _IntegrationSettingsPageState extends State { @override Widget build(BuildContext context) { + if (!_wait && !_changedHere) { + _loadSettings(); + } else if (_changedHere) { + _changedHere = false; + } return ListView( scrollDirection: Axis.vertical, padding: const EdgeInsets.all(20.0),