goblin-desktop 4.0.12 → 4.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "goblin-desktop",
3
- "version": "4.0.12",
3
+ "version": "4.0.13",
4
4
  "description": "Goblin Desktop",
5
5
  "main": "./builders/builders.js",
6
6
  "scripts": {
@@ -89,6 +89,10 @@ module.exports = {
89
89
  );
90
90
  return state.set('notifications', newNotifications);
91
91
  },
92
+ 'read-notification': (state, action) => {
93
+ const id = action.get('notification').id;
94
+ return state.set(`notifications.${id}.status`, 'read');
95
+ },
92
96
  'remove-notification': (state, action) => {
93
97
  const id = action.get('notification').id;
94
98
  return state.del(`notifications.${id}`);
@@ -529,6 +529,14 @@ Goblin.registerQuest(goblinName, 'gamepad-changed', function (
529
529
  // Notifications //
530
530
  //---------------//
531
531
 
532
+ Goblin.registerQuest(goblinName, 'read-notification', function (
533
+ quest,
534
+ notification
535
+ ) {
536
+ quest.do({notification});
537
+ quest.dispatch('update-not-read-count');
538
+ });
539
+
532
540
  Goblin.registerQuest(goblinName, 'add-notification', function (
533
541
  quest,
534
542
  notificationId,