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.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/modules/notifications.js b/src/modules/notifications.js
index 9b91f291..febff488 100644
--- a/src/modules/notifications.js
+++ b/src/modules/notifications.js
@@ -113,6 +113,21 @@ export const notifications = {
}
})
},
+ notificationClicked ({ state, commit }, id) {
+ const notification = state.idStore[id]
+ const { type, seen } = notification
+
+ if (!seen) {
+ switch (type) {
+ case 'mention':
+ case 'pleroma:report':
+ case 'follow_request':
+ break
+ default:
+ commit('markSingleNotificationAsSeen', { id })
+ }
+ }
+ },
setNotificationsLoading ({ rootState, commit }, { value }) {
commit('setNotificationsLoading', { value })
},