fix(webui): sync file edit display preference

This commit is contained in:
chengyongru
2026-07-09 10:42:43 +08:00
committed by Xubin Ren
parent 7768672c5b
commit 6851a6ebd4
4 changed files with 69 additions and 7 deletions
@@ -112,8 +112,8 @@ import {
import { notifyCliAppsChanged } from "@/lib/cli-app-events";
import { copyTextToClipboard } from "@/lib/clipboard";
import {
LOCAL_PREFS_STORAGE_KEY,
readLocalPreferences,
writeLocalPreferences,
type FileEditDisplayMode,
type LocalActivityMode,
type LocalDensity,
@@ -812,11 +812,7 @@ export function SettingsView({
}, [activeSection, token]);
useEffect(() => {
try {
window.localStorage.setItem(LOCAL_PREFS_STORAGE_KEY, JSON.stringify(localPrefs));
} catch {
// Browser-only preferences should never block settings.
}
writeLocalPreferences(localPrefs);
}, [localPrefs]);
useEffect(() => {