diff options
author | Joey Hess <joey@kitenet.net> | 2012-07-30 14:08:22 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-07-30 14:08:22 -0400 |
commit | a9941308434354046fa51d3327c5e05ff080a247 (patch) | |
tree | 025bc566b43d01f6e41908ed635c467d168cb048 /Assistant/DaemonStatus.hs | |
parent | 1f671ee40c7f26d0adb16408ba1cf7fc9ceb3a7a (diff) |
implement server-side alert closing
Rather than using bootstrap's client-side closing.
Now closed alerts stay closed.
Diffstat (limited to 'Assistant/DaemonStatus.hs')
-rw-r--r-- | Assistant/DaemonStatus.hs | 4 |
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 () |