MCPcopy Index your code
hub / github.com/callumalpass/tasknotes / loadFromStorage

Method loadFromStorage

src/services/ViewStateManager.ts:146–160  ·  view source on GitHub ↗

* Load state from localStorage

()

Source from the content-addressed store, hash-verified

144 * Load state from localStorage
145 */
146 private loadFromStorage(): void {
147 try {
148 const stored = this.app.loadLocalStorage(this.storageKey);
149 if (stored && typeof stored === "string") {
150 this.filterState = JSON.parse(stored);
151 }
152 } catch (error) {
153 tasknotesLogger.warn("Failed to load view filter state from storage:", {
154 category: "persistence",
155 operation: "load-view-filter-state-storage",
156 error: error,
157 });
158 this.filterState = {};
159 }
160 }
161
162 /**
163 * Save state to localStorage

Callers 1

constructorMethod · 0.95

Calls 2

parseMethod · 0.80
warnMethod · 0.80

Tested by

no test coverage detected