Skip to content

Commit

Permalink
Fixing #5 and found a way around #4
Browse files Browse the repository at this point in the history
  • Loading branch information
h4llow3En committed Jul 5, 2018
1 parent 34565f0 commit 896aded
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions objc/notify.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -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;
}
}

0 comments on commit 896aded

Please sign in to comment.