Merge branch 'fix-sync-filters' into shigusegubu-themes3
This commit is contained in:
commit
178f9e72a7
3 changed files with 4 additions and 3 deletions
|
|
@ -266,7 +266,7 @@ const Status = {
|
||||||
},
|
},
|
||||||
muteFilterHits() {
|
muteFilterHits() {
|
||||||
return muteFilterHits(
|
return muteFilterHits(
|
||||||
Object.values(useSyncConfigStore().prefsStorage.simple.muteFilters),
|
Object.values(useSyncConfigStore().prefsStorage.simple.muteFilters || {}),
|
||||||
this.status,
|
this.status,
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -635,7 +635,7 @@ export const LOCAL_DEFAULT_CONFIG_DEFINITIONS = {
|
||||||
},
|
},
|
||||||
imageCompression: {
|
imageCompression: {
|
||||||
description: 'Image compression (WebP/JPEG)',
|
description: 'Image compression (WebP/JPEG)',
|
||||||
default: false,
|
default: true,
|
||||||
},
|
},
|
||||||
alwaysUseJpeg: {
|
alwaysUseJpeg: {
|
||||||
description: 'Compress images using JPEG only',
|
description: 'Compress images using JPEG only',
|
||||||
|
|
|
||||||
|
|
@ -796,11 +796,12 @@ export const useSyncConfigStore = defineStore('sync_config', {
|
||||||
afterLoad(state) {
|
afterLoad(state) {
|
||||||
console.debug('Validating persisted state of SyncConfig')
|
console.debug('Validating persisted state of SyncConfig')
|
||||||
const newState = { ...state }
|
const newState = { ...state }
|
||||||
|
newState.prefsStorage = newState.prefsStorage || {}
|
||||||
const newEntries = Object.entries(ROOT_CONFIG).map(([path, value]) => {
|
const newEntries = Object.entries(ROOT_CONFIG).map(([path, value]) => {
|
||||||
const definition = ROOT_CONFIG_DEFINITIONS[path]
|
const definition = ROOT_CONFIG_DEFINITIONS[path]
|
||||||
const finalValue = validateSetting({
|
const finalValue = validateSetting({
|
||||||
path,
|
path,
|
||||||
value: newState.prefsStorage.simple[path],
|
value: newState.prefsStorage.simple?.[path],
|
||||||
definition,
|
definition,
|
||||||
throwError: false,
|
throwError: false,
|
||||||
validateObjects: false,
|
validateObjects: false,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue