Use NSUserNotification identifiers to uniquely find the correct notification from CocoaNotification
This commit is contained in:
parent
1761d5da06
commit
e5d4574d3a
2 changed files with 6 additions and 1 deletions
|
@ -18,7 +18,8 @@ CocoaNotification* NotificationPresenterMac::GetNotification(
|
|||
NSUserNotification* ns_notification) {
|
||||
for (Notification* notification : notifications()) {
|
||||
auto native_notification = static_cast<CocoaNotification*>(notification);
|
||||
if ([native_notification->notification() isEqual:ns_notification])
|
||||
if ([native_notification->notification().identifier
|
||||
isEqual:ns_notification.identifier])
|
||||
return native_notification;
|
||||
}
|
||||
return nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue