fix(alarms): measure the upcoming Dismiss against the silence-after window
This commit is contained in:
1 parent
d81cd04b60
commit
494e46a0c8
1 file changed
+7
-1
@@ -179,7 +179,13 @@ class AlarmEngine @Inject constructor(
|
||||
// persists whatever it should. `fireAt > now` because the resolver keeps
|
||||
// a just-passed occurrence through the fire grace: one already due is
|
||||
// the fire's, not the notice's.
|
||||
val resolution = AlarmResolver.resolve(alarm, states.state(alarmId), now, zones.current())
|
||||
val resolution = AlarmResolver.resolve(
|
||||
alarm,
|
||||
states.state(alarmId),
|
||||
now,
|
||||
zones.current(),
|
||||
settings.currentDefaults().alarmSilenceAfter,
|
||||
)
|
||||
if (resolution.nextFire != fireAt || !UpcomingNotices.isInWindow(fireAt, resolution.source, now)) {
|
||||
// Whatever posted the stale notice is put right on the way out.
|
||||
rescheduleLocked()
|
||||
|
||||
Reference in new issue
Block a user