File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -420,11 +420,13 @@ - (void)userNotificationCenter:(NSUserNotificationCenter *)center
420420 ^{
421421 __block BOOL notificationStillPresent;
422422 do {
423- notificationStillPresent = NO ;
424- for (NSUserNotification *nox in [[NSUserNotificationCenter defaultUserNotificationCenter ] deliveredNotifications ]) {
425- if ([nox.userInfo[@" uuid" ] isEqualToString: [NSString stringWithFormat: @" %ld " , self .hash] ]) notificationStillPresent = YES ;
423+ @autoreleasepool {
424+ notificationStillPresent = NO ;
425+ for (NSUserNotification *nox in [[NSUserNotificationCenter defaultUserNotificationCenter ] deliveredNotifications ]) {
426+ if ([nox.userInfo[@" uuid" ] isEqualToString: [NSString stringWithFormat: @" %ld " , self .hash] ]) notificationStillPresent = YES ;
427+ }
428+ if (notificationStillPresent) [NSThread sleepForTimeInterval: 0 .20f ];
426429 }
427- if (notificationStillPresent) [NSThread sleepForTimeInterval: 0 .20f ];
428430 } while (notificationStillPresent);
429431
430432 dispatch_async (dispatch_get_main_queue (), ^{
You can’t perform that action at this time.
0 commit comments