chore: Update store migration for Coze minapp

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

View File

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

View File

@ -1065,17 +1065,14 @@ const migrateConfig = {
return state return state
}, },
'69': (state: RootState) => { '69': (state: RootState) => {
if (state.minapps) { if (state.minapps) {
const coze = DEFAULT_MIN_APPS.find((app) => app.id === 'coze') const coze = DEFAULT_MIN_APPS.find((app) => app.id === 'coze')
if (coze) { if (coze) {
state.minapps.enabled.push(coze) state.minapps.enabled.push(coze)
}
} }
removeMiniAppIconsFromState(state)
return state
} }
return state
// ...existing code... }
} }
const migrate = createMigrate(migrateConfig as any) const migrate = createMigrate(migrateConfig as any)