(sourceFolder, sourceParent, sourceId = '')
| 2634 | } |
| 2635 | |
| 2636 | function 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 | |
| 2659 | function getPaneListForKey(paneKey) { |
| 2660 | const pane = document.querySelector( |
no test coverage detected