fix: remove same-tag notifications before showing new ones (#24302)
This commit is contained in:
parent
2a6d6d6ea7
commit
fd0eaf4507
3 changed files with 18 additions and 5 deletions
|
@ -37,8 +37,11 @@ void NotificationPresenter::CloseNotificationWithId(
|
|||
[¬ification_id](const Notification* n) {
|
||||
return n->notification_id() == notification_id;
|
||||
});
|
||||
if (it != notifications_.end())
|
||||
(*it)->Dismiss();
|
||||
if (it != notifications_.end()) {
|
||||
Notification* notification = (*it);
|
||||
notification->Dismiss();
|
||||
notifications_.erase(notification);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace electron
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue