aboutsummaryrefslogtreecommitdiff
path: root/src/modules/notifications.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/notifications.js')
-rw-r--r--src/modules/notifications.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/notifications.js b/src/modules/notifications.js
index a3cf76ef..9bd38220 100644
--- a/src/modules/notifications.js
+++ b/src/modules/notifications.js
@@ -52,7 +52,7 @@ export const notifications = {
})
},
markSingleNotificationAsSeen (state, { id }) {
- const notification = find(state.data, n => n.id === id)
+ const notification = state.idStore[id]
if (notification) notification.seen = true
},
dismissNotification (state, { id }) {
@@ -60,7 +60,7 @@ export const notifications = {
delete state.idStore[id]
},
updateNotification (state, { id, updater }) {
- const notification = find(state.data, n => n.id === id)
+ const notification = state.idStore[id]
notification && updater(notification)
}
},
@@ -113,7 +113,7 @@ export const notifications = {
}
})
},
- notificationClicked ({ state, commit }, { id }) {
+ notificationClicked ({ state, dispatch }, { id }) {
const notification = state.idStore[id]
const { type, seen } = notification
@@ -124,7 +124,7 @@ export const notifications = {
case 'follow_request':
break
default:
- commit('markSingleNotificationAsSeen', { id })
+ dispatch('markSingleNotificationAsSeen', { id })
}
}
},