Close action trigger when notification is deleted

This commit is contained in:
Daniel 2023-12-22 14:21:18 +01:00
parent 88f974fa66
commit 7cd682c894

View file

@ -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)
}