diff options
| author | Henry Jameson <me@hjkos.com> | 2023-11-16 20:41:41 +0200 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2023-11-16 20:41:41 +0200 |
| commit | a17defc5abfe60b6aa0dc3275dac2cbec507472a (patch) | |
| tree | 3f32e21fbe024c3dadbfefcb295e43d45d74784c /src/modules/notifications.js | |
| parent | 6ed2cb8f436bca1e1cd4c40a0a2df0e96fb5d149 (diff) | |
handle desktop notifications clicks
Diffstat (limited to 'src/modules/notifications.js')
| -rw-r--r-- | src/modules/notifications.js | 15 |
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 }) }, |
