From 896aded08b042b94fd779094258a7685e4365644 Mon Sep 17 00:00:00 2001 From: h4llow3En Date: Thu, 5 Jul 2018 15:02:39 +0200 Subject: [PATCH] Fixing #5 and found a way around #4 --- objc/notify.m | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/objc/notify.m b/objc/notify.m index 2f0ecf0..78fa919 100644 --- a/objc/notify.m +++ b/objc/notify.m @@ -39,8 +39,8 @@ bool scheduleNotification(NSString *title, NSString *subtitle, NSString *message if (![sound isEqualToString:@"_mute"]) { note.soundName = sound; } - [nc scheduleNotification:note]; + [NSThread sleepForTimeInterval:0.1f]; return YES; } } @@ -68,9 +68,7 @@ bool sendNotification(NSString *title, NSString *subtitle, NSString *message, NS } [nc deliverNotification:note]; - while (ncDelegate.keepRunning) { - [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - } + [NSThread sleepForTimeInterval:0.1f]; return YES; } }