Commit 24d2593e authored by Sebastián Katzer's avatar Sebastián Katzer
Browse files

`cancel` is called with the notification id and not an object.

parent 59f204d6
Loading
Loading
Loading
Loading
+3 −6
Changes for src/android/LocalNotification.java: 3 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -53,13 +53,10 @@ public class LocalNotification extends CordovaPlugin {
        }

        if (action.equalsIgnoreCase("cancel")) {
            JSONObject arguments             = args.getJSONObject(0);
            Activity activity                = cordova.getActivity();
            LocalNotificationOptions options = new LocalNotificationOptions(activity).parse(arguments);
            String alarmId                   = options.getId();
            String id = args.optString(0);

            cancel(alarmId);
            unpersist(alarmId);
            cancel(id);
            unpersist(id);

            return true;
        }