Set static notification identifier

Signed-off-by: Max Risuhin <risuhin.max@gmail.com>
This commit is contained in:
Max Risuhin 2018-10-14 22:37:17 +03:00
parent 2c0b8bed16
commit 4950607cc1
No known key found for this signature in database
GPG Key ID: BF733F5ACA0B4448

View File

@ -85,6 +85,7 @@ BOOL installNSBundleHook()
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0),
^{
int notificationId = [notification.userInfo[@"id"] intValue];
qDebug() << "!!! Notification was delivered to NotificationCenter. ID:" << notificationId;
BOOL notificationAvailable = YES;
while(notificationAvailable) {
notificationAvailable = NO;
@ -156,7 +157,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 = @"im.status.statusim.notifications";
// Add notification to mapper from id to Nofification / NSUserNotification
m_IdToNotification.insert(notification.id(), notification);