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

Function syncFolderStripWithPaneState

public/js/fileListView.js:2167–2191  ·  view source on GitHub ↗
(paneKey)

Source from the content-addressed store, hash-verified

2165}
2166
2167function syncFolderStripWithPaneState(paneKey) {
2168 const strip = document.getElementById('folderStripContainer');
2169 if (!strip) return;
2170 if (!window.showFoldersInList) {
2171 strip.innerHTML = '';
2172 strip.style.display = 'none';
2173 return;
2174 }
2175
2176 const state = getPaneState(paneKey);
2177 const sourceId = String((state && state.sourceId) || '');
2178 const folder = String((state && state.currentFolder) || 'root');
2179 const subfolders = Array.isArray(state?.currentSubfolders) ? state.currentSubfolders : [];
2180 const subfoldersSourceId = String(state?.currentSubfoldersSourceId || '');
2181 const subfoldersFolder = String(state?.currentSubfoldersFolder || '');
2182 const matchesContext = subfoldersSourceId === sourceId && subfoldersFolder === folder;
2183
2184 if (!matchesContext || !subfolders.length) {
2185 strip.innerHTML = '';
2186 strip.style.display = 'none';
2187 return;
2188 }
2189
2190 renderFolderStripPaged(strip, subfolders, sourceId);
2191}
2192
2193function updateInactivePanePlaceholder(inactiveKey) {
2194 if (!window.dualPaneEnabled) return;

Callers 1

setActivePaneFunction · 0.85

Calls 2

getPaneStateFunction · 0.85
renderFolderStripPagedFunction · 0.85

Tested by

no test coverage detected