diff --git a/application/state/useSettingsState.ts b/application/state/useSettingsState.ts index 2884e1275..b6313d2fb 100644 --- a/application/state/useSettingsState.ts +++ b/application/state/useSettingsState.ts @@ -33,7 +33,7 @@ import { STORAGE_KEY_GLOBAL_HOTKEY_ENABLED, STORAGE_KEY_AUTO_UPDATE_ENABLED, STORAGE_KEY_WORKSPACE_FOCUS_STYLE, - STORAGE_KEY_IMMERSIVE_MODE, + } from '../../infrastructure/config/storageKeys'; import { DEFAULT_UI_LOCALE, resolveSupportedLocale } from '../../infrastructure/config/i18n'; import { TERMINAL_THEMES } from '../../infrastructure/config/terminalThemes'; @@ -456,14 +456,6 @@ export const useSettingsState = () => { const storedDefaultViewMode = readStoredString(STORAGE_KEY_SFTP_DEFAULT_VIEW_MODE); if (storedDefaultViewMode === 'list' || storedDefaultViewMode === 'tree') setSftpDefaultViewMode(storedDefaultViewMode); - // Immersive mode - const storedImmersive = readStoredString(STORAGE_KEY_IMMERSIVE_MODE); - if (storedImmersive === 'true' || storedImmersive === 'false') { - const val = storedImmersive === 'true'; - setImmersiveModeState(val); - notifySettingsChanged(STORAGE_KEY_IMMERSIVE_MODE, val); - } - // Workspace focus style const storedFocusStyle = readStoredString(STORAGE_KEY_WORKSPACE_FOCUS_STYLE); if (storedFocusStyle === 'dim' || storedFocusStyle === 'border') setWorkspaceFocusStyleState(storedFocusStyle); @@ -616,9 +608,6 @@ export const useSettingsState = () => { setSftpDefaultViewMode((prev) => (prev === value ? prev : value)); } } - if (key === STORAGE_KEY_IMMERSIVE_MODE && typeof value === 'boolean') { - setImmersiveModeState((prev) => (prev === value ? prev : value)); - } if (key === STORAGE_KEY_WORKSPACE_FOCUS_STYLE && (value === 'dim' || value === 'border')) { setWorkspaceFocusStyleState((prev) => (prev === value ? prev : value)); } @@ -840,13 +829,6 @@ export const useSettingsState = () => { setAutoUpdateEnabled(newValue); } } - // Sync immersive mode from other windows - if (e.key === STORAGE_KEY_IMMERSIVE_MODE && e.newValue !== null) { - const newValue = e.newValue === 'true'; - if (newValue !== s.immersiveMode) { - setImmersiveModeState(newValue); - } - } // Sync workspace focus style from other windows if (e.key === STORAGE_KEY_WORKSPACE_FOCUS_STYLE && e.newValue !== null) { if (e.newValue === 'dim' || e.newValue === 'border') {