fix build
This commit is contained in:
parent
f0aa25059b
commit
773c56f69d
3 changed files with 13 additions and 10 deletions
|
|
@ -55,11 +55,13 @@ const MobileNav = {
|
|||
return unseenNotificationsFromStore(
|
||||
this.$store,
|
||||
useSyncConfigStore().mergedConfig.notificationVisibility,
|
||||
useSyncConfigStore().mergedConfig.ignoreInactionableSeen,
|
||||
)
|
||||
},
|
||||
unseenNotificationsCount() {
|
||||
return (
|
||||
this.unseenNotifications.length + countExtraNotifications(this.$store)
|
||||
this.unseenNotifications.length +
|
||||
countExtraNotifications(this.$store, useSyncConfigStore().mergedConfig)
|
||||
)
|
||||
},
|
||||
unseenCount() {
|
||||
|
|
|
|||
|
|
@ -111,7 +111,10 @@ const Notifications = {
|
|||
return useSyncConfigStore().mergedConfig.ignoreInactionableSeen
|
||||
},
|
||||
extraNotificationsCount() {
|
||||
return countExtraNotifications(this.$store)
|
||||
return countExtraNotifications(
|
||||
this.$store,
|
||||
useSyncConfigStore().mergedConfig,
|
||||
)
|
||||
},
|
||||
unseenCountTitle() {
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import { muteFilterHits } from '../status_parser/status_parser.js'
|
|||
|
||||
import { useAnnouncementsStore } from 'src/stores/announcements.js'
|
||||
import { useI18nStore } from 'src/stores/i18n.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
import FaviconService from 'src/services/favicon_service/favicon_service.js'
|
||||
|
||||
|
|
@ -101,16 +100,16 @@ 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 ignoreInactionableSeen =
|
||||
useSyncConfigStore().mergedConfig.ignoreInactionableSeen
|
||||
|
||||
export const unseenNotificationsFromStore = (
|
||||
store,
|
||||
notificationVisibility,
|
||||
ignoreInactionableSeen,
|
||||
) => {
|
||||
return filteredNotificationsFromStore(store, notificationVisibility).filter(
|
||||
({ seen, type }) => {
|
||||
if (!ignoreInactionableSeen) return !seen
|
||||
|
|
@ -190,9 +189,8 @@ export const prepareNotificationObject = (notification, i18n) => {
|
|||
return notifObj
|
||||
}
|
||||
|
||||
export const countExtraNotifications = (store) => {
|
||||
export const countExtraNotifications = (store, mergedConfig) => {
|
||||
const rootGetters = store.rootGetters || store.getters
|
||||
const mergedConfig = useSyncConfigStore().mergedConfig
|
||||
|
||||
if (!mergedConfig.showExtraNotifications) {
|
||||
return 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue