Loading src/ios/APPLocalNotification.m +2 −2 Changes for src/ios/APPLocalNotification.m: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -360,7 +360,6 @@ */ - (void) didReceiveLocalNotification:(NSNotification*)localNotification { UIApplication* app = [UIApplication sharedApplication]; UILocalNotification* notification = [localNotification object]; BOOL autoCancel = notification.options.autoCancel; Loading @@ -368,7 +367,8 @@ NSString* event = (timeInterval <= 1 && deviceready) ? @"trigger" : @"click"; app.applicationIconBadgeNumber -= 1; [UIApplication sharedApplication] .applicationIconBadgeNumber -= 1; [self fireEvent:event localNotification:notification]; Loading src/ios/APPLocalNotificationOptions.m +7 −1 Changes for src/ios/APPLocalNotificationOptions.m: 7 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -101,7 +101,13 @@ */ - (NSInteger) badgeNumber { return [[dict objectForKey:@"badge"] intValue]; NSInteger number = [[dict objectForKey:@"badge"] intValue]; if (number == -1) { number = 1 + [UIApplication sharedApplication].applicationIconBadgeNumber; } return number; } #pragma mark - Loading www/local-notification.js +1 −1 Changes for www/local-notification.js: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ exports._defaults = { message: '', title: '', autoCancel: false, badge: 0, badge: -1, id: '0', json: '', repeat: '' Loading Loading
src/ios/APPLocalNotification.m +2 −2 Changes for src/ios/APPLocalNotification.m: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -360,7 +360,6 @@ */ - (void) didReceiveLocalNotification:(NSNotification*)localNotification { UIApplication* app = [UIApplication sharedApplication]; UILocalNotification* notification = [localNotification object]; BOOL autoCancel = notification.options.autoCancel; Loading @@ -368,7 +367,8 @@ NSString* event = (timeInterval <= 1 && deviceready) ? @"trigger" : @"click"; app.applicationIconBadgeNumber -= 1; [UIApplication sharedApplication] .applicationIconBadgeNumber -= 1; [self fireEvent:event localNotification:notification]; Loading
src/ios/APPLocalNotificationOptions.m +7 −1 Changes for src/ios/APPLocalNotificationOptions.m: 7 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -101,7 +101,13 @@ */ - (NSInteger) badgeNumber { return [[dict objectForKey:@"badge"] intValue]; NSInteger number = [[dict objectForKey:@"badge"] intValue]; if (number == -1) { number = 1 + [UIApplication sharedApplication].applicationIconBadgeNumber; } return number; } #pragma mark - Loading
www/local-notification.js +1 −1 Changes for www/local-notification.js: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ exports._defaults = { message: '', title: '', autoCancel: false, badge: 0, badge: -1, id: '0', json: '', repeat: '' Loading