File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -420,11 +420,13 @@ - (void)userNotificationCenter:(NSUserNotificationCenter *)center
420
420
^{
421
421
__block BOOL notificationStillPresent;
422
422
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 ];
426
429
}
427
- if (notificationStillPresent) [NSThread sleepForTimeInterval: 0 .20f ];
428
430
} while (notificationStillPresent);
429
431
430
432
dispatch_async (dispatch_get_main_queue (), ^{
You can’t perform that action at this time.
0 commit comments