From 334305c885e129497d322d399a20dfe8acb410d3 Mon Sep 17 00:00:00 2001 From: Pedro Carreno <34664891+Pkcarreno@users.noreply.github.com> Date: Fri, 10 Jan 2025 14:23:52 -0400 Subject: [PATCH] fix(store): default settings --- src/features/editor/stores/settings/index.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/features/editor/stores/settings/index.ts b/src/features/editor/stores/settings/index.ts index a567355..7efebc0 100644 --- a/src/features/editor/stores/settings/index.ts +++ b/src/features/editor/stores/settings/index.ts @@ -36,9 +36,9 @@ const _useSettingsStore = create()( 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 }), @@ -55,7 +55,7 @@ const _useSettingsStore = create()( }), { name: 'settings-storage', - version: 3, + version: 4, migrate: (persistedState, version) => { if (version === 0) { (persistedState as SettingsState).vimMode = false; @@ -68,6 +68,10 @@ const _useSettingsStore = create()( if (version === 2) { (persistedState as SettingsState).editorPlaceholder = true; } + if (version === 3) { + (persistedState as SettingsState).editorPlaceholder = true; + (persistedState as SettingsState).isFirstTime = false; + } return persistedState; },