Skip to content

Commit

Permalink
fix(store): default settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Pkcarreno committed Jan 10, 2025
1 parent 1ee002a commit 334305c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/features/editor/stores/settings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ const _useSettingsStore = create<SettingsState>()(
loop_safeguard_timeout: 30000,
persist_logs: false,
layout_direction: 'horizontal',
isFirstTime: true,
isFirstTime: false,
vimMode: false,
editorPlaceholder: false,
editorPlaceholder: true,
debugMode: false,
updateAutoRun: (value) => set({ auto_run: value }),
updateAutoRunTimeout: (value) => set({ auto_run_timeout: value }),
Expand All @@ -55,7 +55,7 @@ const _useSettingsStore = create<SettingsState>()(
}),
{
name: 'settings-storage',
version: 3,
version: 4,
migrate: (persistedState, version) => {
if (version === 0) {
(persistedState as SettingsState).vimMode = false;
Expand All @@ -68,6 +68,10 @@ const _useSettingsStore = create<SettingsState>()(
if (version === 2) {
(persistedState as SettingsState).editorPlaceholder = true;
}
if (version === 3) {
(persistedState as SettingsState).editorPlaceholder = true;
(persistedState as SettingsState).isFirstTime = false;
}

return persistedState;
},
Expand Down

0 comments on commit 334305c

Please sign in to comment.