Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use a more unique identifier for NSUserNotification instances (backport: 4-1-x) #17483

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions brightray/browser/mac/cocoa_notification.mm
Expand Up @@ -13,8 +13,6 @@

namespace brightray {

int g_identifier_ = 1;

CocoaNotification::CocoaNotification(NotificationDelegate* delegate,
NotificationPresenter* presenter)
: Notification(delegate, presenter) {}
Expand All @@ -29,7 +27,9 @@
notification_.reset([[NSUserNotification alloc] init]);

NSString* identifier =
[NSString stringWithFormat:@"ElectronNotification%d", g_identifier_++];
[NSString stringWithFormat:@"%@:notification:%@",
[[NSBundle mainBundle] bundleIdentifier],
[[[NSUUID alloc] init] UUIDString]];

[notification_ setTitle:base::SysUTF16ToNSString(options.title)];
[notification_ setSubtitle:base::SysUTF16ToNSString(options.subtitle)];
Expand Down