From 773c56f69d5ae8f09f8455e5b4da8cfc4bcfafe7 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Fri, 6 Mar 2026 17:53:40 +0200 Subject: [PATCH] fix build --- src/components/mobile_nav/mobile_nav.js | 4 +++- src/components/notifications/notifications.js | 5 ++++- .../notification_utils/notification_utils.js | 14 ++++++-------- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/components/mobile_nav/mobile_nav.js b/src/components/mobile_nav/mobile_nav.js index 9230bb3c0..d3301c325 100644 --- a/src/components/mobile_nav/mobile_nav.js +++ b/src/components/mobile_nav/mobile_nav.js @@ -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() { diff --git a/src/components/notifications/notifications.js b/src/components/notifications/notifications.js index 6d21ce0ea..d1d01052a 100644 --- a/src/components/notifications/notifications.js +++ b/src/components/notifications/notifications.js @@ -111,7 +111,10 @@ const Notifications = { return useSyncConfigStore().mergedConfig.ignoreInactionableSeen }, extraNotificationsCount() { - return countExtraNotifications(this.$store) + return countExtraNotifications( + this.$store, + useSyncConfigStore().mergedConfig, + ) }, unseenCountTitle() { return ( diff --git a/src/services/notification_utils/notification_utils.js b/src/services/notification_utils/notification_utils.js index 418d9ea49..3463953eb 100644 --- a/src/services/notification_utils/notification_utils.js +++ b/src/services/notification_utils/notification_utils.js @@ -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