Move i18n to new store

This commit is contained in:
Sean King 2023-04-04 14:40:12 -06:00
commit aa98e83ff0
No known key found for this signature in database
GPG key ID: 510C52BACD6E7257
5 changed files with 27 additions and 7 deletions

View file

@ -1,6 +1,7 @@
import { filter, sortBy, includes } from 'lodash'
import { muteWordHits } from '../status_parser/status_parser.js'
import { showDesktopNotification } from '../desktop_notification_utils/desktop_notification_utils.js'
import { useI18nStore } from '../../stores/i18n.js'
export const notificationsFromStore = store => store.state.statuses.notifications.data
@ -59,7 +60,7 @@ export const maybeShowNotification = (store, notification) => {
if (!visibleTypes(store).includes(notification.type)) return
if (notification.type === 'mention' && isMutedNotification(store, notification)) return
const notificationObject = prepareNotificationObject(notification, store.rootGetters.i18n)
const notificationObject = prepareNotificationObject(notification, useI18nStore().i18n)
showDesktopNotification(rootState, notificationObject)
}