(paneKey)
| 2165 | } |
| 2166 | |
| 2167 | function 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 | |
| 2193 | function updateInactivePanePlaceholder(inactiveKey) { |
| 2194 | if (!window.dualPaneEnabled) return; |
no test coverage detected