chore: Update store migration for Coze minapp

This commit is contained in:
kangfenmao 2025-02-16 12:13:26 +08:00
parent c0e0e924f7
commit 5f2cddee09
2 changed files with 7 additions and 10 deletions

View File

@ -30,7 +30,7 @@ const persistedReducer = persistReducer(
{
key: 'cherry-studio',
storage,
version: 68,
version: 69,
blacklist: ['runtime'],
migrate
},

View File

@ -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)