diff --git a/lib/Backend/sensors.dart b/lib/Backend/sensors.dart index e7e96feb..02dc550a 100644 --- a/lib/Backend/sensors.dart +++ b/lib/Backend/sensors.dart @@ -63,6 +63,11 @@ class Trigger extends ChangeNotifier { void triggerDefListener() { if (triggerDefinition?.enabled != _enabled && _enabled) { enabled = false; + notifyListeners(); + } + if (triggerDefinition?.enabled != _enabled && !_enabled) { + enabled = true; + notifyListeners(); } } @@ -155,6 +160,7 @@ abstract class TriggerDefinition extends ChangeNotifier implements Comparable { setState( () { trigger.enabled = value; - ref.watch(triggerListProvider.notifier).store(); + //ref.watch(triggerListProvider.notifier).store(); }, ); },