fix: Windows Toast notification dismissal from Action Center (#40197)
* fix: Windows Toast notification dismissal from Action Center * docs: note Toast behavior in event * chore: address feedback from review
This commit is contained in:
parent
73a42d0b7b
commit
666907d50d
6 changed files with 101 additions and 43 deletions
|
@ -27,10 +27,14 @@ void Notification::NotificationClicked() {
|
|||
Destroy();
|
||||
}
|
||||
|
||||
void Notification::NotificationDismissed() {
|
||||
void Notification::NotificationDismissed(bool should_destroy) {
|
||||
if (delegate())
|
||||
delegate()->NotificationClosed();
|
||||
Destroy();
|
||||
|
||||
set_is_dismissed(true);
|
||||
|
||||
if (should_destroy)
|
||||
Destroy();
|
||||
}
|
||||
|
||||
void Notification::NotificationFailed(const std::string& error) {
|
||||
|
@ -39,6 +43,8 @@ void Notification::NotificationFailed(const std::string& error) {
|
|||
Destroy();
|
||||
}
|
||||
|
||||
void Notification::Remove() {}
|
||||
|
||||
void Notification::Destroy() {
|
||||
presenter()->RemoveNotification(this);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue