summaryrefslogtreecommitdiff
path: root/Assistant/DaemonStatus.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Assistant/DaemonStatus.hs')
-rw-r--r--Assistant/DaemonStatus.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Assistant/DaemonStatus.hs b/Assistant/DaemonStatus.hs
index 77387deb8..3c0bfba42 100644
--- a/Assistant/DaemonStatus.hs
+++ b/Assistant/DaemonStatus.hs
@@ -61,7 +61,7 @@ newDaemonStatus = DaemonStatus
<*> pure Nothing
<*> pure M.empty
<*> pure M.empty
- <*> pure 0
+ <*> pure firstAlertId
<*> pure []
<*> newNotificationBroadcaster
<*> newNotificationBroadcaster
@@ -217,7 +217,7 @@ addAlert dstatus alert = notifyAlert dstatus `after` modifyDaemonStatus dstatus
where
go s = (s { alertMax = i, alertMap = m }, i)
where
- i = alertMax s + 1
+ i = nextAlertId $ alertMax s
m = M.insertWith' const i alert (alertMap s)
removeAlert :: DaemonStatusHandle -> AlertId -> IO ()