chore: update store version and migration

This commit is contained in:
kangfenmao
2025-01-14 14:32:51 +08:00
parent 17e3a966dd
commit 5aed454a62
2 changed files with 15 additions and 1 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ const persistedReducer = persistReducer(
{
key: 'cherry-studio',
storage,
version: 54,
version: 55,
blacklist: ['runtime'],
migrate
},
+14
View File
@@ -9,6 +9,7 @@ import { isEmpty } from 'lodash'
import { createMigrate } from 'redux-persist'
import { RootState } from '.'
import { DEFAULT_SIDEBAR_ICONS } from './settings'
const migrateConfig = {
'2': (state: RootState) => {
@@ -784,6 +785,19 @@ const migrateConfig = {
system: false
})
}
state.settings.sidebarIcons = {
visible: DEFAULT_SIDEBAR_ICONS,
disabled: []
}
return state
},
'55': (state: RootState) => {
if (!state.settings.sidebarIcons) {
state.settings.sidebarIcons = {
visible: DEFAULT_SIDEBAR_ICONS,
disabled: []
}
}
return state
}
}