|
|
@@ -146,18 +146,6 @@ exports.core = {
|
|
|
.update(notification);
|
|
|
},
|
|
|
|
|
|
- /**
|
|
|
- * Updates a single local notification.
|
|
|
- *
|
|
|
- * @param {Object} notification
|
|
|
- * The local notification
|
|
|
- * @param {Object} updates
|
|
|
- * Updated properties
|
|
|
- */
|
|
|
- updateLocalNotification: function (notification, updates) {
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
/**
|
|
|
* Updates existing notifications specified by IDs in options.
|
|
|
*
|
|
|
@@ -174,6 +162,23 @@ exports.core = {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
+ /**
|
|
|
+ * Updates a single local notification.
|
|
|
+ *
|
|
|
+ * @param {Object} notification
|
|
|
+ * The local notification
|
|
|
+ * @param {Object} updates
|
|
|
+ * Updated properties
|
|
|
+ */
|
|
|
+ updateLocalNotification: function (notification, updates) {
|
|
|
+ for (var key in updates) {
|
|
|
+ notification[key] = updates[key];
|
|
|
+ }
|
|
|
+
|
|
|
+ this.cancelLocalNotification(notification.id);
|
|
|
+ this.scheduleLocalNotification(notification);
|
|
|
+ },
|
|
|
+
|
|
|
/**
|
|
|
* Clears the specified notifications.
|
|
|
*
|