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

Function pruneMovedFolderFromInactivePane

public/js/fileListView.js:2636–2657  ·  view source on GitHub ↗
(sourceFolder, sourceParent, sourceId = '')

Source from the content-addressed store, hash-verified

2634}
2635
2636function pruneMovedFolderFromInactivePane(sourceFolder, sourceParent, sourceId = '') {
2637 if (!window.dualPaneEnabled || !sourceFolder || !window.__frPaneState) return;
2638
2639 const inactiveKey = normalizePaneKey(window.activePane) === 'secondary'
2640 ? 'primary'
2641 : 'secondary';
2642 const state = window.__frPaneState[inactiveKey];
2643 if (!state || state.currentFolder !== sourceParent) return;
2644 if (sourceId && state.sourceId && state.sourceId !== sourceId) return;
2645
2646 if (Array.isArray(state.currentSubfolders)) {
2647 state.currentSubfolders = state.currentSubfolders.filter(sf => sf.full !== sourceFolder);
2648 }
2649
2650 const list = document.getElementById('fileListSecondary');
2651 if (!list) return;
2652
2653 try {
2654 const row = list.querySelector(`tr.folder-row[data-folder="${CSS.escape(sourceFolder)}"]`);
2655 if (row) row.remove();
2656 } catch (e) { /* ignore */ }
2657}
2658
2659function getPaneListForKey(paneKey) {
2660 const pane = document.querySelector(

Callers 1

paneDropHandlerFunction · 0.85

Calls 1

normalizePaneKeyFunction · 0.85

Tested by

no test coverage detected