mirror of
https://github.com/status-im/snorenotify.git
synced 2025-02-26 23:10:39 +00:00
Compare id from user info
Signed-off-by: Max Risuhin <risuhin.max@gmail.com>
This commit is contained in:
parent
a0a62a7f14
commit
8656195205
@ -89,7 +89,8 @@ BOOL installNSBundleHook()
|
||||
while(notificationAvailable) {
|
||||
notificationAvailable = NO;
|
||||
for(NSUserNotification *osxNotification in [[NSUserNotificationCenter defaultUserNotificationCenter] deliveredNotifications]) {
|
||||
if([osxNotification.identifier isEqualToString:notification.identifier]) {
|
||||
int fetchedNotificationID = [osxNotification.userInfo[@"id"] intValue];
|
||||
if(fetchedNotificationID == notificationId) {
|
||||
notificationAvailable = YES;
|
||||
[NSThread sleepForTimeInterval:0.25f];
|
||||
break;
|
||||
@ -155,7 +156,7 @@ void OSXNotificationCenter::slotNotify(Snore::Notification notification)
|
||||
osxNotification.title = notification.title().toNSString();
|
||||
osxNotification.userInfo = [NSDictionary dictionaryWithObjectsAndKeys:notificationId, @"id", nil];
|
||||
osxNotification.informativeText = notification.text().toNSString();
|
||||
osxNotification.identifier = notificationId;
|
||||
//osxNotification.identifier = notificationId;
|
||||
|
||||
// Add notification to mapper from id to Nofification / NSUserNotification
|
||||
m_IdToNotification.insert(notification.id(), notification);
|
||||
|
Loading…
x
Reference in New Issue
Block a user