Commit d8d62068 by Sebastián Katzer

Fire event only if notification was found

parent 2ef15dd0
...@@ -250,9 +250,11 @@ public class LocalNotification extends CordovaPlugin { ...@@ -250,9 +250,11 @@ public class LocalNotification extends CordovaPlugin {
Notification notification = Notification notification =
getNotificationMgr().cancel(id); getNotificationMgr().cancel(id);
if (notification != null) {
fireEvent("cancel", notification); fireEvent("cancel", notification);
} }
} }
}
/** /**
* Cancel all scheduled notifications. * Cancel all scheduled notifications.
...@@ -275,9 +277,11 @@ public class LocalNotification extends CordovaPlugin { ...@@ -275,9 +277,11 @@ public class LocalNotification extends CordovaPlugin {
Notification notification = Notification notification =
getNotificationMgr().clear(id); getNotificationMgr().clear(id);
if (notification != null) {
fireEvent("clear", notification); fireEvent("clear", notification);
} }
} }
}
/** /**
* Clear all triggered notifications without canceling them. * Clear all triggered notifications without canceling them.
......
...@@ -121,8 +121,6 @@ class AssetUtil { ...@@ -121,8 +121,6 @@ class AssetUtil {
return Uri.EMPTY; return Uri.EMPTY;
} }
/** /**
* URI for a file. * URI for a file.
* *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment