From a96b847011f6d0e9561df9eeb520bdc3827693fa Mon Sep 17 00:00:00 2001 From: zontreck Date: Sun, 9 Jun 2024 13:52:56 -0700 Subject: [PATCH] Fix repeating alerts --- lib/statemachine.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/statemachine.dart b/lib/statemachine.dart index 02c01d5..43ebff5 100644 --- a/lib/statemachine.dart +++ b/lib/statemachine.dart @@ -253,7 +253,9 @@ class StateMachine { for (WarnIntervals WI in WarnIntervals.values) { if (WI == WarnIntervals.NONE) continue; - if (WI.seconds >= sec && WI.seconds <= current.seconds) { + if (WI.seconds >= sec && + WI.seconds <= current.seconds && + WI != current) { current = WI; send = true;