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) return false
|
||||||
if (notification.status.muted) return true
|
if (notification.status.muted) return true
|
||||||
return muteFilterHits(notification.status).length > 0
|
return muteFilterHits(muteFilters, notification.status).length > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
export const maybeShowNotification = (
|
export const maybeShowNotification = (
|
||||||
store,
|
store,
|
||||||
notificationVisibility,
|
notificationVisibility,
|
||||||
|
muteFilters,
|
||||||
notification,
|
notification,
|
||||||
) => {
|
) => {
|
||||||
|
console.log('NOTIF', store, notificationVisibility, muteFilters, notification)
|
||||||
const rootState = store.rootState || store.state
|
const rootState = store.rootState || store.state
|
||||||
|
|
||||||
if (notification.seen) return
|
if (notification.seen) return
|
||||||
if (!visibleTypes(notificationVisibility).includes(notification.type)) return
|
if (!visibleTypes(notificationVisibility).includes(notification.type)) return
|
||||||
if (notification.type === 'mention' && isMutedNotification(notification))
|
if (notification.type === 'mention' && isMutedNotification(muteFilters, notification))
|
||||||
return
|
return
|
||||||
|
|
||||||
const notificationObject = prepareNotificationObject(
|
const notificationObject = prepareNotificationObject(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue