fix notifications not showing up
This commit is contained in:
parent
5929ea0369
commit
7b3bf9d290
1 changed files with 5 additions and 3 deletions
|
|
@ -65,22 +65,24 @@ const sortById = (a, b) => {
|
|||
}
|
||||
}
|
||||
|
||||
const isMutedNotification = (notification) => {
|
||||
const isMutedNotification = (muteFilters, notification) => {
|
||||
if (!notification.status) return false
|
||||
if (notification.status.muted) return true
|
||||
return muteFilterHits(notification.status).length > 0
|
||||
return muteFilterHits(muteFilters, notification.status).length > 0
|
||||
}
|
||||
|
||||
export const maybeShowNotification = (
|
||||
store,
|
||||
notificationVisibility,
|
||||
muteFilters,
|
||||
notification,
|
||||
) => {
|
||||
console.log('NOTIF', store, notificationVisibility, muteFilters, notification)
|
||||
const rootState = store.rootState || store.state
|
||||
|
||||
if (notification.seen) return
|
||||
if (!visibleTypes(notificationVisibility).includes(notification.type)) return
|
||||
if (notification.type === 'mention' && isMutedNotification(notification))
|
||||
if (notification.type === 'mention' && isMutedNotification(muteFilters, notification))
|
||||
return
|
||||
|
||||
const notificationObject = prepareNotificationObject(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue