implement server-side alert closing
Rather than using bootstrap's client-side closing. Now closed alerts stay closed.
This commit is contained in:
parent
1f671ee40c
commit
a994130843
5 changed files with 30 additions and 103 deletions
|
@ -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 ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue