Quellcode durchsuchen

Fixes #612 cannot update icon or sound

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

+ 1 - 0
CHANGELOG.md

@@ -11,6 +11,7 @@ Please also read the [Upgrade Guide](https://github.com/katzer/cordova-plugin-lo
 - Fixed #732 loop between update and trigger (Android)
 - Fixed #710 crash due to >500 notifications (Android)
 - Fixed #682 crash while resuming app from notification (Android 6)
+- Fixed #612 cannot update icon or sound (Android)
 - Fixed crashing `get(ID)` if notification doesn't exist
 
 #### Version 0.8.2 (08.11.2015)

+ 1 - 1
src/android/notification/Manager.java

@@ -120,7 +120,7 @@ public class Manager {
                 notification.getOptions().getDict(), updates);
 
         try {
-            options.putOpt("updated", true);
+            options.put("updated", true);
         } catch (JSONException ignore) {}
 
         return schedule(options, receiver);

+ 1 - 1
src/android/notification/Options.java

@@ -129,7 +129,7 @@ public class Options {
      */
     private void parseAssets() {
 
-        if (options.has("iconUri"))
+        if (options.has("iconUri") && !options.optBoolean("updated"))
             return;
 
         Uri iconUri  = assets.parse(options.optString("icon", "icon"));