From 1e1087abbba3347dfc327c08a10379db9bee313a Mon Sep 17 00:00:00 2001 From: Zhuo Lu Date: Tue, 16 Jan 2018 18:59:58 -0800 Subject: [PATCH] Simplify formatting --- brightray/browser/mac/cocoa_notification.mm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/brightray/browser/mac/cocoa_notification.mm b/brightray/browser/mac/cocoa_notification.mm index d669577bad..17f556efb9 100644 --- a/brightray/browser/mac/cocoa_notification.mm +++ b/brightray/browser/mac/cocoa_notification.mm @@ -29,13 +29,12 @@ CocoaNotification::~CocoaNotification() { void CocoaNotification::Show(const NotificationOptions& options) { notification_.reset([[NSUserNotification alloc] init]); - NSString* identifier = [NSString stringWithFormat:@"%s%d", "ElectronNotification", g_identifier_]; + NSString* identifier = [NSString stringWithFormat:@"ElectronNotification%d", g_identifier_++]; [notification_ setTitle:base::SysUTF16ToNSString(options.title)]; [notification_ setSubtitle:base::SysUTF16ToNSString(options.subtitle)]; [notification_ setInformativeText:base::SysUTF16ToNSString(options.msg)]; [notification_ setIdentifier:identifier]; - g_identifier_++; if (getenv("ELECTRON_DEBUG_NOTIFICATIONS")) { LOG(INFO) << "Notification created (" << [identifier UTF8String] << ")";