directly access storage for muteWords
This commit is contained in:
parent
6211b9adc9
commit
a44060bd3b
1 changed files with 5 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
import { storage } from 'src/lib/storage.js'
|
||||||
|
|
||||||
export const CONFIG_MIGRATION = 1
|
export const CONFIG_MIGRATION = 1
|
||||||
|
|
||||||
|
|
@ -23,8 +23,10 @@ export const declarations = [
|
||||||
migrationNum: 1,
|
migrationNum: 1,
|
||||||
description: 'Mute filters, wordfilter/regexp/etc',
|
description: 'Mute filters, wordfilter/regexp/etc',
|
||||||
valueType: 'complex',
|
valueType: 'complex',
|
||||||
migration(serverside, rootState) {
|
migration: async (serverside, rootState) => {
|
||||||
useMergedConfigStore().mergedConfig.muteWords.forEach((word, order) => {
|
const vuexState = (await storage.getItem('vuex-lz')) ?? {}
|
||||||
|
|
||||||
|
vuexState.config?.muteWords?.forEach((word, order) => {
|
||||||
const uniqueId = uuidv4()
|
const uniqueId = uuidv4()
|
||||||
|
|
||||||
serverside.setPreference({
|
serverside.setPreference({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue