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

Fire event only if notification was found

parent 2ef15dd0
Loading
Loading
Loading
Loading
+4 −0
Changes for src/android/LocalNotification.java: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -250,9 +250,11 @@ public class LocalNotification extends CordovaPlugin {
            Notification notification =
                    getNotificationMgr().cancel(id);

            if (notification != null) {
                fireEvent("cancel", notification);
            }
        }
    }

    /**
     * Cancel all scheduled notifications.
@@ -275,9 +277,11 @@ public class LocalNotification extends CordovaPlugin {
            Notification notification =
                    getNotificationMgr().clear(id);

            if (notification != null) {
                fireEvent("clear", notification);
            }
        }
    }

    /**
     * Clear all triggered notifications without canceling them.
+0 −2
Changes for src/android/notification/AssetUtil.java: 0 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -121,8 +121,6 @@ class AssetUtil {
		return Uri.EMPTY;
	}



	/**
	 * URI for a file.
	 *