handle desktop notifications clicks
This commit is contained in:
parent
6ed2cb8f43
commit
a17defc5ab
4 changed files with 31 additions and 8 deletions
|
|
@ -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 })
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue