Commit 282875db by Sebastián Katzer

Replacing a notification with the same ID may result into canceling both (Fix for #135)

parent 6d717f2b
## ChangeLog ## ChangeLog
#### Version 0.7.4 (not yet released)
- [bugfix:] Platform specific properties were ignored.
- [bugfix:] cancel may throw an error if the OS returns NIL values (iOS).
- [bugfix:] Replacing a notification with the same ID may result into canceling both (iOS).
#### Version 0.7.3 (16.03.2014) #### Version 0.7.3 (16.03.2014)
- [bugfix:] cancel callbacks have not been fired after all notifications have been canceled on iOS. - [bugfix:] cancel callbacks have not been fired after all notifications have been canceled on iOS.
- [change:] The `oncancel` callback will be called at last if `autoCancel` is set to true (iOS). - [change:] The `oncancel` callback will be called at last if `autoCancel` is set to true (iOS).
......
...@@ -106,7 +106,10 @@ ...@@ -106,7 +106,10 @@
if ([self isNotificationScheduledWithId:id]) { if ([self isNotificationScheduledWithId:id]) {
UILocalNotification* notification = [self notificationWithId:id]; UILocalNotification* notification = [self notificationWithId:id];
[self cancelNotification:notification fireEvent:NO]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.3 * NSEC_PER_SEC),
dispatch_get_main_queue(), ^{
[self cancelNotification:notification fireEvent:NO];
});
} }
[self scheduleNotificationWithProperties:properties]; [self scheduleNotificationWithProperties:properties];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment