more test fixes
This commit is contained in:
parent
7505c94986
commit
b09efcb5f3
2 changed files with 16 additions and 19 deletions
|
|
@ -1,7 +1,8 @@
|
|||
import { showDesktopNotification } from '../desktop_notification_utils/desktop_notification_utils.js'
|
||||
import { muteFilterHits } from '../status_parser/status_parser.js'
|
||||
|
||||
import { useAnnouncementsStore } from 'src/stores/announcements'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useAnnouncementsStore } from 'src/stores/announcements.js'
|
||||
import { useI18nStore } from 'src/stores/i18n.js'
|
||||
|
||||
import FaviconService from 'src/services/favicon_service/favicon_service.js'
|
||||
|
|
@ -100,14 +101,14 @@ export const filteredNotificationsFromStore = (
|
|||
.map((_) => _)
|
||||
.sort(sortById)
|
||||
// TODO implement sorting elsewhere and make it optional
|
||||
console.log(types, visibleTypes(notificationVisibility))
|
||||
return sortedNotifications.filter((notification) =>
|
||||
(types || visibleTypes(notificationVisibility)).includes(notification.type),
|
||||
)
|
||||
}
|
||||
|
||||
export const unseenNotificationsFromStore = (store, notificationVisibility) => {
|
||||
const rootGetters = store.rootGetters || store.getters
|
||||
const ignoreInactionableSeen = rootGetters.mergedConfig.ignoreInactionableSeen
|
||||
const ignoreInactionableSeen = useSyncConfigStore().mergedConfig.ignoreInactionableSeen
|
||||
|
||||
return filteredNotificationsFromStore(store, notificationVisibility).filter(
|
||||
({ seen, type }) => {
|
||||
|
|
@ -188,10 +189,7 @@ export const prepareNotificationObject = (notification, i18n) => {
|
|||
return notifObj
|
||||
}
|
||||
|
||||
export const countExtraNotifications = (store) => {
|
||||
const rootGetters = store.rootGetters || store.getters
|
||||
const mergedConfig = rootGetters.mergedConfig
|
||||
|
||||
export const countExtraNotifications = (mergedConfig) => {
|
||||
if (!mergedConfig.showExtraNotifications) {
|
||||
return 0
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue