MCPcopy Create free account
hub / github.com/error311/FileRise / loadFolderTreeState

Function loadFolderTreeState

public/js/folderManager.js:421–440  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

419// ---- end peekHasFolders ----
420
421function loadFolderTreeState() {
422 const key = getFolderTreeStateKey();
423 try {
424 const state = localStorage.getItem(key);
425 if (state) return JSON.parse(state);
426 } catch (e) { /* ignore */ }
427
428 if (key !== 'folderTreeState') {
429 try {
430 const legacy = localStorage.getItem('folderTreeState');
431 if (legacy) {
432 const parsed = JSON.parse(legacy);
433 saveFolderTreeState(parsed);
434 return parsed;
435 }
436 } catch (e) { /* ignore */ }
437 }
438
439 return {};
440}
441function saveFolderTreeState(state) {
442 const key = getFolderTreeStateKey();
443 localStorage.setItem(key, JSON.stringify(state));

Callers 10

expandAncestorsFunction · 0.85
makeChildLiFunction · 0.85
selectFolderFunction · 0.85
expandAndLoadSavedStateFunction · 0.85
loadFolderTreeFunction · 0.85
folderManager.jsFile · 0.85
expandTreePathFunction · 0.85
expandTreePathAsyncFunction · 0.85

Calls 2

getFolderTreeStateKeyFunction · 0.85
saveFolderTreeStateFunction · 0.85

Tested by

no test coverage detected