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
|
@ -111,8 +111,6 @@ void CocoaNotification::Dismiss() {
|
|||
|
||||
NotificationDismissed();
|
||||
|
||||
this->LogAction("dismissed");
|
||||
|
||||
notification_.reset(nil);
|
||||
}
|
||||
|
||||
|
@ -163,8 +161,9 @@ void CocoaNotification::NotificationDismissed() {
|
|||
}
|
||||
|
||||
void CocoaNotification::LogAction(const char* action) {
|
||||
if (getenv("ELECTRON_DEBUG_NOTIFICATIONS")) {
|
||||
if (getenv("ELECTRON_DEBUG_NOTIFICATIONS") && notification_) {
|
||||
NSString* identifier = [notification_ valueForKey:@"identifier"];
|
||||
DCHECK(identifier);
|
||||
LOG(INFO) << "Notification " << action << " (" << [identifier UTF8String]
|
||||
<< ")";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue