fix(webui): sync file edit display preference
This commit is contained in:
1 parent
7768672c5b
commit
6851a6ebd4
4 files changed
+69
-7
No files matched your search
@@ -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(() => {
|
||||
|
||||
Reference in new issue
Block a user