Эх сурвалжийг харах

Reset badge with cancelAll #85

Sebastián Katzer 12 жил өмнө
parent
commit
e28ca15d9d

+ 1 - 0
README.md

@@ -49,6 +49,7 @@ More informations can be found [here](https://build.phonegap.com/plugins/413).
 #### Version 0.7.2 (not yet released)
 - [enhancement:] Avoid blocking the main thread (on Android) **(dpogue)**.
 - [bugfix:] `onadd` was called each time after a repeating message was triggered (Android)
+- [change:] Reset badge with cancelAll.
 
 #### Version 0.7.1 (31.01.2014)
 - [bugfix:] `ongoing` attribute was ignored.

+ 1 - 0
src/ios/APPLocalNotification.m

@@ -103,6 +103,7 @@ NSString *const kAPP_LOCALNOTIFICATION = @"APP_LOCALNOTIFICATION";
         [[NSUserDefaults standardUserDefaults] synchronize];
 
         [[UIApplication sharedApplication] cancelAllLocalNotifications];
+        [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
     }];
 }
 

+ 1 - 0
src/wp8/LocalNotification.cs

@@ -90,6 +90,7 @@ namespace Cordova.Extension.Commands
                 // Empty strings for the text values and URIs will result in the property being cleared.
                 FlipTileData TileData = new FlipTileData
                 {
+                    Count                = 0,
                     BackTitle            = "",
                     BackContent          = "",
                     WideBackContent      = "",