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

Fix get* with single id on windows

parent 388adbd4
Loading
Loading
Loading
Loading
+48 −0
Changes for src/windows/LocalNotificationProxy.js: 48 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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.