* Load state from localStorage
()
| 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 |
no test coverage detected