From 5f2cddee092926ac0cba3da4b0b60bea4e026eac Mon Sep 17 00:00:00 2001 From: kangfenmao Date: Sun, 16 Feb 2025 12:13:26 +0800 Subject: [PATCH] chore: Update store migration for Coze minapp --- src/renderer/src/store/index.ts | 2 +- src/renderer/src/store/migrate.ts | 15 ++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/renderer/src/store/index.ts b/src/renderer/src/store/index.ts index 60e083f8..1cca18b8 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: 68, + version: 69, blacklist: ['runtime'], migrate }, diff --git a/src/renderer/src/store/migrate.ts b/src/renderer/src/store/migrate.ts index f87382b5..6fd17f99 100644 --- a/src/renderer/src/store/migrate.ts +++ b/src/renderer/src/store/migrate.ts @@ -1065,17 +1065,14 @@ const migrateConfig = { return state }, '69': (state: RootState) => { - if (state.minapps) { - const coze = DEFAULT_MIN_APPS.find((app) => app.id === 'coze') - if (coze) { - state.minapps.enabled.push(coze) - } + if (state.minapps) { + const coze = DEFAULT_MIN_APPS.find((app) => app.id === 'coze') + if (coze) { + state.minapps.enabled.push(coze) } - removeMiniAppIconsFromState(state) - return state } - - // ...existing code... + return state + } } const migrate = createMigrate(migrateConfig as any)