Parcourir la source

Implemented clearAll and cancelAll for Windows

Sebastián Katzer il y a 8 ans
Parent
commit
b69640e0c5
1 fichiers modifiés avec 28 ajouts et 0 suppressions
  1. 28 0
      src/windows/LocalNotificationProxy.js

+ 28 - 0
src/windows/LocalNotificationProxy.js

@@ -101,6 +101,34 @@ exports.schedule = function (success, error, args) {
     success();
 };
 
+/**
+ * Clear all notifications.
+ *
+ * @param [ Function ] success Success callback
+ * @param [ Function ] error   Error callback
+ *
+ * @return [ Void ]
+ */
+exports.clearAll = function (success, error) {
+    impl.clearAll();
+    exports.fireEvent('clearall');
+    success();
+};
+
+/**
+ * Cancel all notifications.
+ *
+ * @param [ Function ] success Success callback
+ * @param [ Function ] error   Error callback
+ *
+ * @return [ Void ]
+ */
+exports.cancelAll = function (success, error) {
+    impl.cancelAll();
+    exports.fireEvent('cancelall');
+    success();
+};
+
 /**
  * Get the type of notification.
  *