mirror of
https://github.com/safing/portbase
synced 2025-04-08 19:49:09 +00:00
Close action trigger when notification is deleted
This commit is contained in:
parent
88f974fa66
commit
7cd682c894
1 changed files with 11 additions and 0 deletions
|
@ -393,6 +393,17 @@ func (n *Notification) Update(expires int64) {
|
|||
|
||||
// Delete (prematurely) cancels and deletes a notification.
|
||||
func (n *Notification) Delete() {
|
||||
// Dismiss notification.
|
||||
func() {
|
||||
n.lock.Lock()
|
||||
defer n.lock.Unlock()
|
||||
|
||||
if n.actionTrigger != nil {
|
||||
close(n.actionTrigger)
|
||||
n.actionTrigger = nil
|
||||
}
|
||||
}()
|
||||
|
||||
n.delete(true)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue