MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / clearLegacyVolatileUiState

Function clearLegacyVolatileUiState

packages/client/src/app/uiState.ts:87–103  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85}
86
87export function clearLegacyVolatileUiState(): void {
88 if (typeof window === "undefined") {
89 return;
90 }
91
92 try {
93 const parsed = JSON.parse(
94 window.localStorage.getItem(UI_STATE_STORAGE_KEY) ?? "{}",
95 ) as PersistedUiState;
96 if (parsed.search != null) {
97 delete parsed.search;
98 window.localStorage.setItem(UI_STATE_STORAGE_KEY, JSON.stringify(parsed));
99 }
100 } catch {
101 window.localStorage.removeItem(UI_STATE_STORAGE_KEY);
102 }
103}
104
105export function readStoredAccessibilitySource(): AccessibilitySourcePreference {
106 if (typeof window === "undefined") {

Callers 1

AppShell.tsxFile · 0.90

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected