mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-24 07:05:25 -07:00
WebUI: Fix collapsing folders with expanded folders inside
This commit is contained in:
parent
3dead0793b
commit
8ae3007cf4
1 changed files with 12 additions and 2 deletions
|
@ -2658,8 +2658,18 @@ window.qBittorrent.DynamicTable ??= (() => {
|
||||||
|
|
||||||
this._updateNodeCollapseIcon(node, shouldCollapse);
|
this._updateNodeCollapseIcon(node, shouldCollapse);
|
||||||
|
|
||||||
for (const child of node.children)
|
this._updateNodeChildVisibility(node, shouldCollapse);
|
||||||
this._updateNodeVisibility(child, shouldCollapse);
|
},
|
||||||
|
|
||||||
|
_updateNodeChildVisibility: function(root, shouldHide) {
|
||||||
|
const stack = [...root.children];
|
||||||
|
while (stack.length > 0) {
|
||||||
|
const node = stack.pop();
|
||||||
|
|
||||||
|
this._updateNodeVisibility(node, (shouldHide ? shouldHide : this.isCollapsed(node.root.rowId)));
|
||||||
|
|
||||||
|
stack.push(...node.children);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
clear: function() {
|
clear: function() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue