diff --git a/src/renderer/src/store/index.ts b/src/renderer/src/store/index.ts index 940515c90..6a21f6987 100644 --- a/src/renderer/src/store/index.ts +++ b/src/renderer/src/store/index.ts @@ -30,7 +30,7 @@ const persistedReducer = persistReducer( { key: 'cherry-studio', storage, - version: 54, + version: 55, blacklist: ['runtime'], migrate }, diff --git a/src/renderer/src/store/migrate.ts b/src/renderer/src/store/migrate.ts index b01ccff21..c0e47a4d8 100644 --- a/src/renderer/src/store/migrate.ts +++ b/src/renderer/src/store/migrate.ts @@ -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 } }