Quellcode durchsuchen

Fixes #700 notifications appears on bootup

Sebastián Katzer vor 10 Jahren
Ursprung
Commit
0a44a11ac6
2 geänderte Dateien mit 3 neuen und 0 gelöschten Zeilen
  1. 1 0
      CHANGELOG.md
  2. 2 0
      src/android/RestoreReceiver.java

+ 1 - 0
CHANGELOG.md

@@ -19,6 +19,7 @@ Please also read the [Upgrade Guide](https://github.com/katzer/cordova-plugin-lo
 - Fixed #612 cannot update icon or sound (Android)
 - Fixed crashing `get(ID)` if notification doesn't exist
 - Fixed #569 `getScheduled` returns two items per notification
+- Fixed #700 notifications appears on bootup
 
 #### Version 0.8.2 (08.11.2015)
 - Submitted to npm

+ 2 - 0
src/android/RestoreReceiver.java

@@ -44,6 +44,8 @@ public class RestoreReceiver extends AbstractRestoreReceiver {
     public void onRestore (Notification notification) {
         if (notification.isScheduled()) {
             notification.schedule();
+        } else {
+            notification.cancel();
         }
     }