notification-related settings
This commit is contained in:
parent
a4845bf275
commit
3fbf21a757
4 changed files with 21 additions and 9 deletions
|
|
@ -105,15 +105,17 @@ export const filteredNotificationsFromStore = (
|
|||
)
|
||||
}
|
||||
|
||||
export const unseenNotificationsFromStore = (store) => {
|
||||
export const unseenNotificationsFromStore = (store, notificationVisibility) => {
|
||||
const rootGetters = store.rootGetters || store.getters
|
||||
const ignoreInactionableSeen = rootGetters.mergedConfig.ignoreInactionableSeen
|
||||
|
||||
return filteredNotificationsFromStore(store).filter(({ seen, type }) => {
|
||||
if (!ignoreInactionableSeen) return !seen
|
||||
if (seen) return false
|
||||
return ACTIONABLE_NOTIFICATION_TYPES.has(type)
|
||||
})
|
||||
return filteredNotificationsFromStore(store, notificationVisibility).filter(
|
||||
({ seen, type }) => {
|
||||
if (!ignoreInactionableSeen) return !seen
|
||||
if (seen) return false
|
||||
return ACTIONABLE_NOTIFICATION_TYPES.has(type)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
export const prepareNotificationObject = (notification, i18n) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue