handle desktop notifications clicks

This commit is contained in:
Henry Jameson 2023-11-16 20:41:41 +02:00
commit a17defc5ab
4 changed files with 31 additions and 8 deletions

View file

@ -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 })
},