Selaa lähdekoodia

Fix get* with single id on windows

Sebastián Katzer 10 vuotta sitten
vanhempi
commit
424e6e0e16
1 muutettua tiedostoa jossa 48 lisäystä ja 0 poistoa
  1. 48 0
      src/windows/LocalNotificationProxy.js

+ 48 - 0
src/windows/LocalNotificationProxy.js

@@ -208,6 +208,54 @@ exports.getTriggeredIds = function (success, error) {
     success(ids);
 };
 
+/**
+ * Propertys for given notification.
+ *
+ * @param {Function} success
+ *      Success callback
+ * @param {Function} error
+ *      Error callback
+ * @param {int[]} ids
+ *      List of local notification IDs
+ */
+exports.getSingle = function (success, error, ids) {
+    var notification = exports.core.getAll(ids)[0];
+
+    success(notification);
+};
+
+/**
+ * Propertys for given scheduled notification.
+ *
+ * @param {Function} success
+ *      Success callback
+ * @param {Function} error
+ *      Error callback
+ * @param {int[]} ids
+ *      List of local notification IDs
+ */
+exports.getSingleScheduled = function (success, error, ids) {
+    var notification = exports.core.getScheduled(ids)[0];
+
+    success(notification);
+};
+
+/**
+ * Propertys for given triggered notification.
+ *
+ * @param {Function} success
+ *      Success callback
+ * @param {Function} error
+ *      Error callback
+ * @param {int[]} ids
+ *      List of local notification IDs
+ */
+exports.getSingleTriggered = function (success, error, ids) {
+    var notification = exports.core.getTriggered(ids)[0];
+
+    success(notification);
+};
+
 /**
  * Property list for given notifications.
  * If called without IDs, all notification will be returned.