don't use sss inside service because otherwice vite will eat your face
This commit is contained in:
parent
c087e91a15
commit
671e975364
3 changed files with 12 additions and 7 deletions
|
@ -16,6 +16,7 @@ import generateProfileLink from 'src/services/user_profile_link_generator/user_p
|
|||
import { highlightClass, highlightStyle } from '../../services/user_highlighter/user_highlighter.js'
|
||||
import { muteFilterHits } from '../../services/status_parser/status_parser.js'
|
||||
import { unescape, uniqBy } from 'lodash'
|
||||
import { useServerSideStorageStore } from 'src/stores/serverSideStorage'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
|
@ -219,7 +220,10 @@ const Status = {
|
|||
return !!this.currentUser
|
||||
},
|
||||
muteFilterHits () {
|
||||
return muteFilterHits(this.status)
|
||||
return muteFilterHits(
|
||||
Object.values(useServerSideStorageStore().prefsStorage.simple.muteFilters),
|
||||
this.status
|
||||
)
|
||||
},
|
||||
botStatus () {
|
||||
return this.status.user.actor_type === 'Service'
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import apiService from '../services/api/api.service.js'
|
||||
import { useServerSideStorageStore } from 'src/stores/serverSideStorage'
|
||||
|
||||
import {
|
||||
isStatusNotification,
|
||||
|
@ -112,7 +113,11 @@ export const notifications = {
|
|||
commit('updateNotificationsMinMaxId', notification.id)
|
||||
commit('addNewNotifications', { notifications: [notification] })
|
||||
|
||||
maybeShowNotification(store, notification)
|
||||
maybeShowNotification(
|
||||
store,
|
||||
Object.values(useServerSideStorageStore().prefsStorage.simple.muteFilters),
|
||||
notification
|
||||
)
|
||||
} else if (notification.seen) {
|
||||
state.idStore[notification.id].seen = true
|
||||
}
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
import { useServerSideStorageStore } from 'src/stores/serverSideStorage'
|
||||
|
||||
export const muteFilterHits = (status) => {
|
||||
export const muteFilterHits = (muteFilters, status) => {
|
||||
const statusText = status.text.toLowerCase()
|
||||
const statusSummary = status.summary.toLowerCase()
|
||||
|
||||
const muteFilters = Object.values(useServerSideStorageStore().prefsStorage.simple.muteFilters)
|
||||
|
||||
return muteFilters.toSorted((a,b) => b.order - a.order).map(filter => {
|
||||
const { hide, expires, name, value, type, enabled} = filter
|
||||
if (!enabled) return false
|
||||
|
|
Loading…
Add table
Reference in a new issue