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(
|
return unseenNotificationsFromStore(
|
||||||
this.$store,
|
this.$store,
|
||||||
useSyncConfigStore().mergedConfig.notificationVisibility,
|
useSyncConfigStore().mergedConfig.notificationVisibility,
|
||||||
|
useSyncConfigStore().mergedConfig.ignoreInactionableSeen,
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
unseenNotificationsCount() {
|
unseenNotificationsCount() {
|
||||||
return (
|
return (
|
||||||
this.unseenNotifications.length + countExtraNotifications(this.$store)
|
this.unseenNotifications.length +
|
||||||
|
countExtraNotifications(this.$store, useSyncConfigStore().mergedConfig)
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
unseenCount() {
|
unseenCount() {
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,10 @@ const Notifications = {
|
||||||
return useSyncConfigStore().mergedConfig.ignoreInactionableSeen
|
return useSyncConfigStore().mergedConfig.ignoreInactionableSeen
|
||||||
},
|
},
|
||||||
extraNotificationsCount() {
|
extraNotificationsCount() {
|
||||||
return countExtraNotifications(this.$store)
|
return countExtraNotifications(
|
||||||
|
this.$store,
|
||||||
|
useSyncConfigStore().mergedConfig,
|
||||||
|
)
|
||||||
},
|
},
|
||||||
unseenCountTitle() {
|
unseenCountTitle() {
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ import { muteFilterHits } from '../status_parser/status_parser.js'
|
||||||
|
|
||||||
import { useAnnouncementsStore } from 'src/stores/announcements.js'
|
import { useAnnouncementsStore } from 'src/stores/announcements.js'
|
||||||
import { useI18nStore } from 'src/stores/i18n.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'
|
import FaviconService from 'src/services/favicon_service/favicon_service.js'
|
||||||
|
|
||||||
|
|
@ -101,16 +100,16 @@ export const filteredNotificationsFromStore = (
|
||||||
.map((_) => _)
|
.map((_) => _)
|
||||||
.sort(sortById)
|
.sort(sortById)
|
||||||
// TODO implement sorting elsewhere and make it optional
|
// TODO implement sorting elsewhere and make it optional
|
||||||
console.log(types, visibleTypes(notificationVisibility))
|
|
||||||
return sortedNotifications.filter((notification) =>
|
return sortedNotifications.filter((notification) =>
|
||||||
(types || visibleTypes(notificationVisibility)).includes(notification.type),
|
(types || visibleTypes(notificationVisibility)).includes(notification.type),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const unseenNotificationsFromStore = (store, notificationVisibility) => {
|
export const unseenNotificationsFromStore = (
|
||||||
const ignoreInactionableSeen =
|
store,
|
||||||
useSyncConfigStore().mergedConfig.ignoreInactionableSeen
|
notificationVisibility,
|
||||||
|
ignoreInactionableSeen,
|
||||||
|
) => {
|
||||||
return filteredNotificationsFromStore(store, notificationVisibility).filter(
|
return filteredNotificationsFromStore(store, notificationVisibility).filter(
|
||||||
({ seen, type }) => {
|
({ seen, type }) => {
|
||||||
if (!ignoreInactionableSeen) return !seen
|
if (!ignoreInactionableSeen) return !seen
|
||||||
|
|
@ -190,9 +189,8 @@ export const prepareNotificationObject = (notification, i18n) => {
|
||||||
return notifObj
|
return notifObj
|
||||||
}
|
}
|
||||||
|
|
||||||
export const countExtraNotifications = (store) => {
|
export const countExtraNotifications = (store, mergedConfig) => {
|
||||||
const rootGetters = store.rootGetters || store.getters
|
const rootGetters = store.rootGetters || store.getters
|
||||||
const mergedConfig = useSyncConfigStore().mergedConfig
|
|
||||||
|
|
||||||
if (!mergedConfig.showExtraNotifications) {
|
if (!mergedConfig.showExtraNotifications) {
|
||||||
return 0
|
return 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue